Ok, here's a weird one. I have an AGI script where one user calls another. The call is answered. Everything is peachy. If the call is terminated by the CALLEE hanging up the call, then Asterisk returns control back to where the Dial() command left off, and I can check the return code of Dial(), ${DIALSTATUS} etc. That's all great. HOWEVER, if the CALLER hangs up the call, it seems as if Asterisk immediately kills the AGI script. My script seems to terminate immediately and therefore execution does not continue after the Dial() command. Because of this, I cannot do any post call processing, or even check the return code from Dial() or ${DIALSTATUS}. I don't know yet, but this may prevent me from being able to put calls through to voicemail as well. Anyone seen this? It's a consistent problem.
Douglas Garstang schrieb:> ... > HOWEVER, if the CALLER hangs up the call, it seemsHi, did you try the dial command option g? I did not neither, but when I understand the voip-wiki right, it might help you. Roger. Voip-wiki page about dial: http://www.voip-info.org/wiki-Asterisk+cmd+Dial
Just tried it. No difference. Here's the console output when the callee hangs up: *CLI> -- Executing AGI("SIP/3254102-bb27", "ipt/iptrouter.py|FromOnNetPhone") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/ipt/iptrouter.py -- AGI Script Executing Application: (SetMusicOnHold) Options: (default) -- AGI Script Executing Application: (Dial) Options: (SIP/9220402|20|trg) -- Called 9220402 -- SIP/9220402-ca1b is ringing -- SIP/9220402-ca1b answered SIP/3254102-bb27 -- Attempting native bridge of SIP/3254102-bb27 and SIP/9220402-ca1b 1 (ANSWER) -- AGI Script ipt/iptrouter.py completed, returning 0 == Auto fallthrough, channel 'SIP/3254102-bb27' status is 'ANSWER' and here it is when the caller hangs up: *CLI> -- Executing AGI("SIP/3254102-0276", "ipt/iptrouter.py|FromOnNetPhone") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/ipt/iptrouter.py -- AGI Script Executing Application: (SetMusicOnHold) Options: (default) -- AGI Script Executing Application: (Dial) Options: (SIP/9220402|20|trg) -- Called 9220402 -- SIP/9220402-af98 is ringing -- SIP/9220402-af98 answered SIP/3254102-0276 -- Attempting native bridge of SIP/3254102-0276 and SIP/9220402-af98 == Spawn extension (From_OneEighty, 9220402, 1) exited non-zero on 'SIP/3254102-0276' as you can see, quite different.... -----Original Message----- From: Roger Schreiter [mailto:roger@planinternet.de] Sent: Monday, February 27, 2006 2:31 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] AGI Scripts Terminate too Soon Douglas Garstang schrieb:> ... > HOWEVER, if the CALLER hangs up the call, it seemsHi, did you try the dial command option g? I did not neither, but when I understand the voip-wiki right, it might help you. Roger. Voip-wiki page about dial: http://www.voip-info.org/wiki-Asterisk+cmd+Dial _______________________________________________ --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
> Douglas Garstang schrieb: > > ... > > HOWEVER, if the CALLER hangs up the call, it seems > > > Hi, > > did you try the dial command option g? > I did not neither, but when I understand the voip-wiki right, > it might help you. > > > Roger. >I've used the 'g' option and as far as I can tell it works just the way you want it to - the extension keeps processing even after the destination channel hangs up. I believe the default for the dial() command is to drop the source channel (and rather unceremoniously at that) when the destination channel hangs up. -MC
> http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DeadAGI > > Cheers, > Jean-Michel. >I am red-faced! The TFOT book explicitly says this on page 158, on the box titled, "AGI(), EAGI(), DeadAGI(), and FastAGI()": "The DeadAGI() application is also just like AGI(), but it works correctly on a channel that is dead (i.e., a channel that has been hung up). As this implies, the regular AGI() application doesn't work on dead channels." Jean-Michel, thanks for pointing out the (almost) obvious! -MC
If that's true, why does dial() return control to the script when the callee hangs up? -----Original Message----- From: Michael Collins [mailto:mcollins@fcnetwork.biz] Sent: Monday, February 27, 2006 3:43 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] AGI Scripts Terminate too Soon> http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DeadAGI > > Cheers, > Jean-Michel. >I am red-faced! The TFOT book explicitly says this on page 158, on the box titled, "AGI(), EAGI(), DeadAGI(), and FastAGI()": "The DeadAGI() application is also just like AGI(), but it works correctly on a channel that is dead (i.e., a channel that has been hung up). As this implies, the regular AGI() application doesn't work on dead channels." Jean-Michel, thanks for pointing out the (almost) obvious! -MC _______________________________________________ --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
> If that's true, why does dial() return control to the script when the > callee hangs up? >Doug, if I understand the AGI limitation correctly, the 'dead' in DeadAGI() refers to the other end of a dial() connection. I *think*, but I'm not positive on that. Does anyone know the answer to this one? Thanks, MC
><snip> >HOWEVER, if the CALLER hangs up the call, it seems as if Asterisk immediately kills the AGI script. My script seems to terminate immediately and therefore execution does not continue after the Dial() command. ></snip> >http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DeadAGI Cheers, Jean-Michel.
A thread on running 5000 simultaneous cllas ran on this list recently and it did generate a lot of heat. You might want to look it up the archives - but make sure you read as many posts on it as possible because lots of different opinions formulated over time.> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Vic > Sent: Tuesday, February 28, 2006 10:07 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [Asterisk-Users] transferring 3000 SIP calls > > Hi, all, > > we are building a forwarding station in Japan where we > would be receiving and forwarding over 3000 SIP calls at > the same time. > > The calls will be offered to us via a carrier as SIP and > we will forward the call via the same carrier as SIP. > > The callflow would look like this: > > 1. SIP call come in > 2. System will authenticate the call based on the number > 3. Check the billing information and if it is ok, forward > the call to another number (as SIP) > 4. If call is not ok, system will connect the call to IVR > for an announcement and touch-tone input > > We are thinking about using Asterisk for this. > How big of a system should it be? > > Can we use one linux box for this (and another for backup) > or will it be something humangously huge? > > Thanks, > Vic > _______________________________________________ > --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