Streaming asx files with music on hold

Hello,
I’m trying to stream music on hold from a radio station in an asx format,
After reading this: voip-info.org/wiki/view/Aste … nhold.conf
I managed to stream station such as “http://95.141.24.98:80” using this config:
[test-radio]
mode=custom
application=/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 95.141.24.98:80

but when trying to stream asx stations i just get silence,
after reading every possible post over the internet about this I understand that mpg123 can’t stream asx type streams and you have to use mplayer for that,
I tried all examples for mplayer stream but I couldn’t get it to work,
here is a station example i try to stream: bbc.co.uk/radio/listen/live/r1.asx

Please help,

Thanks,
Rami.

Check 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 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