Results 1 to 4 of 4
Hello everybody!
Can anyone explain to me what this script does:
#!/bin/bash
if [ -n "`ls /tmp/asterisk-moh-pipe.*`" ]; then
rm /tmp/asterisk-moh-pipe.*
fi
PIPE="/tmp/asterisk-moh-pipe.$$"
mknod $PIPE p
mplayer -really-quiet -nowaveheader -quiet ...
- 04-09-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 2
Mplayer stream to stdout
Hello everybody!
Can anyone explain to me what this script does:
And it is taken from here#!/bin/bash
if [ -n "`ls /tmp/asterisk-moh-pipe.*`" ]; then
rm /tmp/asterisk-moh-pipe.*
fi
PIPE="/tmp/asterisk-moh-pipe.$$"
mknod $PIPE p
mplayer -really-quiet -nowaveheader -quiet -shuffle -ao pcm -format 8192 -channels 1 -af resample=8000 -aofile $PIPE "$@" 2>/dev/null | cat $PIPE 2>/dev/null
rm $PIPE
P.S
Basically what I am trying to do is to have mms:// radio to be As music on Hold in Asterisk PBX and for that, script should output raw audio to stdout, like it is done here:
At the moment I didn't find any solutions on the internet how to have mms radio as your MOH so making this work would be a great help for everyone who wants to have this craziness on their PBX#!/bin/bash
/usr/bin/wget -q -O - http://govoritmoskva.ru:8100/GovoritMoskva-92FM_MP3_LQ | /usr/bin/madplay -Q -z -o raw:- --mono -R 8000 -a -12 -
- 04-09-2007 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 2
Got it!
here is the script to play mms:// stream for MOH in Asterisk PBX
#!/bin/bash
if [ -n "`ls /tmp/asterisk-moh-pipe.*`" ]; then
rm /tmp/asterisk-moh-pipe.*
fi
PIPE="/tmp/asterisk-moh-pipe"
mknod $PIPE p
mplayer mms://stream.rfn.ru/mayak -really-quiet -quiet -shuffle -ao pcm -format 0x2000 -channels 1 -af resample=8000 -ao pcm:file=$PIPE | cat $PIPE
rm $PIPE
- 04-06-2011 #3Just Joined!
- Join Date
- Apr 2011
- Posts
- 8
i have tried the script posted by norim but there is no sound in the MOH, help please
- 04-06-2011 #4forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,095
Hello and welcome to the forums, mos33!

This thread is 4 years old so I'm going to lock it, but don't hesitate to start a new thread of your own if you are having any issues with Linux.
Thank you.oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.


