Hi, I am searching for the most effective solution for the following scenario: Our users can call into our IVR menu and dial a specific extension and immediately hang up. This event should simply trigger Asterisk to make multiple simultaneous calls through a group of zap channels (5-10 calls). When the called parties answer, Asterisk should simply play a message and hangup. So I was thinking that I could simply add this in extensions.conf: exten => 844844,1,Playback(multicall-activated) exten => 844844,2,agi(multicallagi.php) exten => 844844,3,Hangup Then the AGI script would simply create a call file for each destination number and the format would be something like this: Channel: Zap/g0/5555555 MaxRetries: 2 RetryTime: 10 WaitTime: 5 Application: Playback Data: soundfile However, Asterisk doesn't wait for the destination to pick the phone up, so the playback ends prematurely and the channel is closed. It works only if I use "Channel: SIP/5555 " (ie. it waits until the SIP phone answers and then plays the soundfile). I tried using Context: mycontext Extension: s Priority: 1 and the same thing happens: the context lines are "run" immediately and even if the destination is not on line. The only difference here is that I can make a long loop so it plays back several times so that if the called party picks the phone up, there's a chance that they will here the looped playback. But this isn't very effective. Has someone done a "better" approach? Does someone know why only ZAP channels seem to misbehave (they are immediately considered "answered" when they are not) ? Also, could the multicallagi.php script "cut free" a zap channel in case all channels are already in use in group g0? Basically, these would be emergency calls and I wouldn't want them to be hanging around a long time in the outgoing queue. Also if multicallagi.php frees a busy channel it could get busy again before the call file is placed in "outgoing". So is there a way so that Asterisk knows that the call files I'm putting in outgoing are "emergency calls"? I know I could dedicate another group of channels or a single channel for these calls but I don't have any available. Thanks Vieri __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Gustavo Cordeiro
2007-Apr-24 04:33 UTC
[asterisk-users] auto dial out multiple destinations
I have the same problem using analog trunks (FXO), without solution. Now we only use digital (E1) or IP trunks (SIP/IAX) for auto-dial out. See this page for more information: http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out#Tipsandhints If you get the solution, please let me know! =) Sds, Gustavo>From: Vieri <rentorbuy@yahoo.com> >Reply-To: Asterisk Users Mailing List - Non-Commercial >Discussion<asterisk-users@lists.digium.com> >To: asterisk-users@lists.digium.com >Subject: [asterisk-users] auto dial out multiple destinations >Date: Tue, 24 Apr 2007 03:32:33 -0700 (PDT) > >Hi, > >I am searching for the most effective solution for the >following scenario: > >Our users can call into our IVR menu and dial a >specific extension and immediately hang up. This event >should simply trigger Asterisk to make multiple >simultaneous calls through a group of zap channels >(5-10 calls). When the called parties answer, Asterisk >should simply play a message and hangup. > >So I was thinking that I could simply add this in >extensions.conf: > >exten => 844844,1,Playback(multicall-activated) >exten => 844844,2,agi(multicallagi.php) >exten => 844844,3,Hangup > >Then the AGI script would simply create a call file >for each destination number and the format would be >something like this: > >Channel: Zap/g0/5555555 >MaxRetries: 2 >RetryTime: 10 >WaitTime: 5 >Application: Playback >Data: soundfile > >However, Asterisk doesn't wait for the destination to >pick the phone up, so the playback ends prematurely >and the channel is closed. It works only if I use >"Channel: SIP/5555 " (ie. it waits until the SIP phone >answers and then plays the soundfile). > >I tried using >Context: mycontext >Extension: s >Priority: 1 > >and the same thing happens: the context lines are >"run" immediately and even if the destination is not >on line. The only difference here is that I can make a >long loop so it plays back several times so that if >the called party picks the phone up, there's a chance >that they will here the looped playback. But this >isn't very effective. > >Has someone done a "better" approach? >Does someone know why only ZAP channels seem to >misbehave (they are immediately considered "answered" >when they are not) ? > >Also, could the multicallagi.php script "cut free" a >zap channel in case all channels are already in use in >group g0? Basically, these would be emergency calls >and I wouldn't want them to be hanging around a long >time in the outgoing queue. Also if multicallagi.php >frees a busy channel it could get busy again before >the call file is placed in "outgoing". So is there a >way so that Asterisk knows that the call files I'm >putting in outgoing are "emergency calls"? I know I >could dedicate another group of channels or a single >channel for these calls but I don't have any >available. > >Thanks > >Vieri > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >--Bandwidth and Colocation provided by Easynews.com -- > >asterisk-users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users_________________________________________________________________ Descubra como mandar Torpedos do Messenger para o celular! http://mobile.msn.com/
Vieri wrote:> However, Asterisk doesn't wait for the destination to > pick the phone up, so the playback ends prematurely >This has been discussed many times. Search the archives. If you are using standard POTS lines, then Asterisk sees the call as being answered immediately. You'll need to ask for the user to press some key to hear the message. Loop it three or more times. If nobody presses the key, hangup. If you are on a digital service such as a PRI, then you'll have call supervision and this won't be an issue. Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
--- Gustavo Cordeiro <gustavo.cordeiro@hotmail.com> wrote:> I have the same problem using analog trunks (FXO), > without solution. Now > we only use digital (E1) or IP trunks (SIP/IAX) for > auto-dial out. > > See this page for more information: >http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out#Tipsandhints Thanks Gustavo, I played with callprogress and answeronpolarityswitch but no luck. Will either loop or use the c option in DIAL() or use digital lines or SIP. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com