Hi everyone.
I am trying to work on a solution, where a caller can dial into DID and listen Internet radio streams. He/she should be able to navigate around the streams by entering numbers(1,2,…12,…).
Asterisk version: 1.6.2.18 compile from source
Distribution: CentOS 5.6 (Final)
I searched the forums and Internet but could not find any thing relevant to my problems.
So far, I have been able to make this work but still have problems with the following;
- Once musiconhold() app start executing, there is no way to accept user input through DTMF, at least in my knowledge.
- I found a solution to problem (1) above In the msiconhold.conf, there is a parameter “digit”
;digit=# ; If this option is set for a class, then when callers are listening to music on hold, they can press this digit, and
; they will switch to listening to this music class.
The problem with this is that it only accepts single digit. I am not sure but may be its designed to accept only single digit.
When I enter two digit number, it either only accepts first digit or select a two digit number randomly.
The bottom line is that I want user to be able to navigate through streams by entering the relevant digit codes. It would be best if I could read user input after musiconhold() starts executing, or any other solution that makes it work.
Here is the snippet of config files.
extensions.conf
[incoming]
exten=>1234,1,Answer()
exten=>1234,2,Wait(2)
exten=>1234,3,Background(Welcomeradio)
exten=>1234,4,WaitExten(,)
exten=>1234,5,NoOp()
exten=>1,1,MusicOnHold(1)
exten=>2,1,MusicOnHold(2)
exten=>3,1,MusicOnHold(3)
exten=>4,1,MusicOnHold(4)
exten=>5,1,MusicOnHold(5)
exten=>6,1,MusicOnHold(6)
exten=>7,1,MusicOnHold(7)
exten=>8,1,MusicOnHold(8)
exten=>9,1,MusicOnHold(9)
exten=>10,1,MusicOnHold(10)
exten=>11,1,MusicOnHold(11)
exten=>12,1,MusicOnHold(12)
exten=>#,1,Background(Welcomeradio)
exten=>#,2,WaitExten()
exten=>#,3,Goto(incoming,5)
exten=>i,1,Goto(incoming,3)
exten=>t,1,hangup()
musiconhold.conf
[1]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 4013.live.streamtheworld.com:80/ARNCITY_SC
digit=1
[2]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 radionri2.lbdns-streamguys.com
digit=2
[3]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 69.162.119.226:8300
digit=3
[4]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 208.186.112.40:8000
digit=4
[5]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 live.apnaradio.com:3232
digit=5
[6]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 -@ provisioning.streamtheworld.com/pls/CHUMFM.pls
digit=6
[7]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 -@ provisioning.streamtheworld.com/ … _DUBAI.pls
digit=7
[8]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 -@ provisioning.streamtheworld.com/ … AI_EYE.pls
digit=8
[9]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 -@ provisioning.streamtheworld.com/pls/DUBAI_92.pls
digit=9
[10]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 -@ provisioning.streamtheworld.com/ … LEEJIA.pls
digit=10
[11]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 -@ provisioning.streamtheworld.com/ … RABIYA.pls
digit=11
[12]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 islam2day.tv:4000
digit=12