Asterisk 13.7 MOH web radio stream wideband plays slooow!

Hi,

I am trying this with Asterisk 13.7 :

"Re: Streaming asx files with music on hold
Postby sizhutou » Tue Jun 30, 2015 7:16 am

Check http://forums.digium.com/viewtopic.php?p=77308

(1) create a script file, say /var/lib/asterisk/moh/bbn.sh, make sure it’s executable by asterisk
#!/bin/bash
#if [ -n “ls /tmp/asterisk-moh-pipe.*” ]; then
#rm -f /tmp/asterisk-moh-pipe.*
#fi
PIPE="/tmp/asterisk-moh-pipe.$$"
mknod $PIPE p
sleep 3
mplayer -nocache -playlist http://www.bbnradio.org/WindowsMediaDot … nglish.asx -really-quiet -quiet
-ao pcm:fast -channels 1 -af resample=8000,channels=1,format=mulaw -ao pcm:file=$PIPE | cat $PIPE
rm $PIPE

(2) add a section in /etc/asterisk/musiconhold.conf
[bbn]
mode=custom
applicaiton=/var/lib/asterisk/bbn.sh

In asterisk 13, you may enable wideband audio by assigning resample=16000, format=s16le in bbn.sh and appending a line “format=slin16” to musiconhold.conf
sizhutou
Newsterisk

Posts: 1
Joined: Tue Jun 30, 2015 6:58 am"

But ,

i cannot play stream correct “to slow”, with resample=16000, format=s16le and also i think that the “format=slin16” in musiconhold.conf must be “format=sln16”.
I can play the stream with normal speed, with resample=8000,channels=1,format=mulaw.

Also in files mode everything works as expected.

Thank u!

Hallo again,

The above article was correct.

The bug is on freepbx (latest 13).

It has a limit of 5 characters for field “optional format” in custom category of MOH.
So when “optional format” = slin16 in freepbx it saves “format=slin1” in /etc/asterisk/musiconhold_additional.conf.
Correct manually the conf lile and restart.
It works also (better audio) with resample=44100, format=s16le and format=slin44 .

Thank u!