標題:
將 ASTERISK 變成 收音機 - 聽881/903..
[打印本頁]
作者:
lamsoft
時間:
2013-5-14 18:38
標題:
將 ASTERISK 變成 收音機 - 聽881/903..
大家有無試過咁做?
打個DID, 2nd stage dialing 按下特定extension駁落指定Music Oh Hold Extension, 再指落Shell Script, Call 起 mplayer stdout返比 asterisk, 轉返ulaw出聲比返個 dialer...
作者:
SuiYan
時間:
2013-5-14 21:02
哈哈. 有創意, 我鐘意.
不過, 我喜歡靚聲靚效果.
作者:
角色
時間:
2013-5-14 22:46
回復
1#
lamsoft
能把整个example写出来?
作者:
lamsoft
時間:
2013-5-15 01:11
回復 lamsoft
能把整个example写出来?
角色 發表於 2013-5-14 22:46
就係整唔掂
已確定 asterisk 版本 stream 野時, 唔知點解會將音量大小較大, 像normalize一樣, 無論input source volume是小或是正常, 出來的音效都是很大
mplayer 用fifo + cat fifo 在 -ao volume=-20, -30, 都不行, 至到-49時一下子就沒有聲音
Example is available here but not successfully because the volume issue of my asterisk version 1.8.21.0.
http://www.osslab.com.tw/VoIP/IP ... _Radio_with_mplayer
香港 mms 頻道頁
(Radio)
商台 - 雷霆881
mms://mslive02.881903.com/cr1
商台 - 叱吒903
mms://mslive02.881903.com/cr2
mms://mslive03.881903.com/toolbar_cr2
新城財經台 (FM104)
mms://metromedia.104metrofinance.com/fmselect
mms://s1.104mfonline.com.hk/Encoder5
mms://s.1.104mfonline.com.hk/Encoder5?MSWMExt=.asf
新城知訊台 (FM99.7)
mms://metromedia.997metroshowbiz.com/hit997
http://s1.104mfonline.com.hk/Encoder4
mms://s.1.104mfonline.com.hk/Encoder4?MSWMExt=.asf
新城Plus (AM104.4)
http://s1.104mfonline.com.hk/Encoder3
mms://s.1.104mfonline.com.hk/Encoder3?MSWMExt=.asf
香港電台第一台
http://www.rthk.org.hk/live1.asx
mms://202.177.192.111/radio1
香港電台第二台
http://www.rthk.org.hk/live2.asx
mms://202.177.192.111/radio2
香港電台第三台
http://www.rthk.org.hk/live3.asx
mms://202.177.192.111/radio3
香港電台第四台
http://www.rthk.org.hk/live4.asx
mms://202.177.192.111/radio4
香港電台第五台
http://www.rthk.org.hk/live5.asx
mms://202.177.192.111/radio5
香港電台普通話台
http://www.rthk.org.hk/live6.asx
mms://202.177.192.111/ptc
澳門電台
mms://202.175.80.10/LiveAudio
美國CNN電台
http://us.cnn.com/audio/radio/liveaudio.asx
中廣音樂網
http://hichannel.hinet.net/player/radio/index.jsp?radio_id=206
作者:
lamsoft
時間:
2013-5-21 15:42
經過詳細研究..
以下係我心得, 轉載時請註明出處
網上話過要做mms streaming 要加audio filter 指去mulaw, channel=1 及 sampling 為8000
但我經仔細研究後, 如果要播cr1 / cr2既話, 其實係唔駛將個format指去mulaw, 響musiconhold.conf format指返slin (ulaw唔work的)
跟住個mplayer command為
/usr/bin/mplayer -nocache mms://mslive02.881903.com/cr1 -vc null -vo null -af resample=8000,channels=1 -ao pcm:fast
複製代碼
以下係我個shell script, 基本上裝返個mplayer (centos 及 redhat 可用yum install, 其他版本請自行了解) 就可以播了
musiconhold.conf
[moh_903]
mode=custom
application=/var/lib/asterisk/moh_903.sh
format=slin
複製代碼
/var/lib/asterisk/moh_903.sh
#!/bin/bash
PIPE=/tmp/moh_903
RADIO=mms://mslive02.881903.com/cr2
if [ -f $PIPE ]; then
rm $PIPE
fi
mkfifo $PIPE
/usr/bin/mplayer -nocache $RADIO -really-quiet -quiet -vc null -vo null -af resample=8000,channels=1 -ao pcm:fast -ao pcm:file=$PIPE | cat $PIPE
rm $PIPE
複製代碼
記得將 /var/lib/asterisk/moh_903.sh chmod 為 executable (755)
作者:
orangelau
時間:
2013-5-24 23:47
厲害厲害
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/)
Powered by Discuz! 7.2