Jump to content

streaming music on hold


nate

Recommended Posts

  • 3 months later...

OK, got this to work pretty well with a few caveats. Some processing was required to the audio, but once it was done it sounded great and in theory one could set up a music server with these processed files and spit them out all day - or even subscribe to an internet radio station.

 

In case you're not familiar with the RTP streaming format, what we're doing is using another computer to send audio packets to the CS410 on a certain port. We just tell the CS410 to listen on that port in MoH setup, set the domain preference to use that source, and we're good to go.

 

The program I am using to generate the RTP stream is called VLC and while it does have options to transcode a file on the fly, it doesn't seem to work very well so I transcoded the audio files first using audacity This means I DID NOT make it work with standard, stereo mp3 files like we all have right away, I had to process the music files first to be:

 

-Mono

-16 bit

-8 khz

 

I also lowered the volume significantly.

 

Fortunately, it's the same format as the moh.wav file that comes with the pbxnsip prompts, so you can use that to test and as an example of volume. If you have a bunch of music to change, you can batch script it using sox - pretty straightforward to figure out.

 

Once you have installed VLC on a computer, use the following command line:

 

VLC moh.wav --loop --norm-max-level=5 --sout='#transcode{acodec=ulaw,samplerate=8000,channels=1,ab=16}:rtp{dst=192.168.1.2,port-audio=4000]'

We're telling VLC to loop moh.wav over and over, keep the volume reasonable, and output as ulaw, 8khz, mono, 16 bit, to a server located at 192.168.1.2 on port 4000. A full reference for these command line settings is here.

 

Now, I realize that these settings in theory would make VLC transcode any music file, but when I tried using a stereo MP3 file it was awful. Maybe someone else can play around with different source formats. I have been playing with it for a while and pre-processing the music - while a bit of a pain - worked flawlessly.

 

The only problem I've found is if the stream stops, the CS410 keeps repeating the last packet over and over, which sounds horrible. It would be nice if it could go silent or revert to the internal wav file if it sees the stream drop.

 

--

 

So Kevin, does this get me some license brownie points? ;)

Link to comment
Share on other sites

  • 11 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...