[asterisk-users] AGI <==> DeadAGI

SIP sip at arcdiv.com
Sun May 2 20:56:45 CDT 2010


On 5/2/2010 4:52 PM, Steve Edwards wrote:
> On Sat, 1 May 2010, SIP wrote:
>
> [snip]
>
>    
>> We run DeadAGI for a considerable number of calls since it has the
>> ability to run post-hangup cleanup no matter which side hangs up (unlike
>> AGI).
>>      
> [snip]
>
> When a channel hangs up, Asterisk sends a SIGHUP signal to the AGI. If the
> AGI did not establish a handler for the SIGHUP, the AGI exits. If the AGI
> established a handler, the AGI can choose to ignore the signal or execute
> appropriate code -- like clean up files, write a CDR to the database, etc.
>
> If the AGI is started when the channel is "live," you should use agi() and
> catch signals appropriately. If the AGI is started when the channel is
> "dead," you should use deadagi().
>
>    
Right. That's the way it works in theory, with the nice separation of 
AGI on live channels and DeadAGI on dead channels.  But with our 
scripts, we use DeadAGI because the channel will redial different 
gateways after a live connection is made if there's a problem, and we've 
been unable to figure out how to get that from AGI, since, once the 
channel is hung up, it won't let us redial again.

I'm sure it's a matter of just some little collection of things we're 
doing wrong, but for the moment, DeadAGI works swimmingly, so we haven't 
delved too deeply.

We've never run into one of the supposed problems with running DeadAGI 
on a live channel.

N.



More information about the asterisk-users mailing list