Hello, Most traditional PBX-es have the ability to use external audio source (e.g. radio tuner) for music on hold. This is also useful because you can let your users listen to radio by dialing some extension. I wanted to achieve the same on asterisk, and chan_alsa seemed the logical choice. I installed ALSA drivers, connected the radio to line-in and added the folowing to extensions.conf: exten => *55,1,Dial(Console/Line) And indeed, now I could listen to radio by dialing *55. There are some problems, however: 1. Asterisk treats this as a normal call, so only one user can listen at a time. Is there a way to let several user listen simultaneously? 2. As this is a low priority call, it should be dropped when incoming call is sent to a channel which dialed it. I guess SoftHangup could be used, but I don't know how to determine which channel to hangup. 3. I have no idea how to use this as a source for music on hold. Any help would be appreciated. Niksa
Write your own res_musiconhold.c to open up the dev and read in frames like it does from the pipe used for mpg123 If you don't know for sure how contact me off list and we could quote a price to write something like that. bkw> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Niksa Baldun > Sent: Monday, January 03, 2005 2:09 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] Line-in as MOH source > > Hello, > > Most traditional PBX-es have the ability to use external audio source > (e.g. radio tuner) for music on hold. This is also useful because you > can let your users listen to radio by dialing some extension. > > I wanted to achieve the same on asterisk, and chan_alsa seemed the > logical choice. I installed ALSA drivers, connected the radio to line-in > and added the folowing to extensions.conf: > > exten => *55,1,Dial(Console/Line) > > And indeed, now I could listen to radio by dialing *55. There are some > problems, however: > > 1. Asterisk treats this as a normal call, so only one user can listen at > a time. Is there a way to let several user listen simultaneously? > 2. As this is a low priority call, it should be dropped when incoming > call is sent to a channel which dialed it. I guess SoftHangup could be > used, but I don't know how to determine which channel to hangup. > 3. I have no idea how to use this as a source for music on hold. > > Any help would be appreciated. > > Niksa > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Niksa Baldun wrote:> Hello, > > Most traditional PBX-es have the ability to use external audio source > (e.g. radio tuner) for music on hold. This is also useful because you > can let your users listen to radio by dialing some extension.The other option would be to see if the radio station that you like has a stream on the web... -- Cheers, Matt Riddell _______________________________________________ Daily Asterisk News: http://www.sineapps.com/news.php for html http://www.sineapps.com/rssfeed.php for rss
Did you ever work this out? ----- Original Message ----- From: "Niksa Baldun" <niksa.baldun@lumiss.hr> Sent: Monday, January 03, 2005 1:07 PM Subject: [Asterisk-Users] Line-in as MOH source> Hello, > > Most traditional PBX-es have the ability to use external audio source > (e.g. radio tuner) for music on hold. This is also useful because you > can let your users listen to radio by dialing some extension. > > I wanted to achieve the same on asterisk, and chan_alsa seemed the > logical choice. I installed ALSA drivers, connected the radio to line-in > and added the folowing to extensions.conf: > > exten => *55,1,Dial(Console/Line) > > And indeed, now I could listen to radio by dialing *55. There are some > problems, however: > > 1. Asterisk treats this as a normal call, so only one user can listen at > a time. Is there a way to let several user listen simultaneously? > 2. As this is a low priority call, it should be dropped when incoming > call is sent to a channel which dialed it. I guess SoftHangup could be > used, but I don't know how to determine which channel to hangup. > 3. I have no idea how to use this as a source for music on hold. > > Any help would be appreciated. > > Niksa > >