[asterisk-users] DeadAgi

Matt Riddell matt at venturevoip.com
Sun Dec 23 18:40:41 CST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Edwards wrote:
> On Thu, 6 Dec 2007, Bhrugu Mehta wrote:
> 
>> I am new to use DeadAgi,
>> can anybody help me how to use DeadAgi,
>>
>> actually i want this,
>>
>> when caller hangup his/her phone, i want to send packet to my other app that
>> check caller hung up done.
> 
> It's "dead" easy :)
> 
> Deadagi() is just like agi() with a couple of differences. In fact (in 
> 1.2), both are defined in res_agi.c and "dead" is just a flag passed to 
> run_agi().
> 
> The differences are how much interaction you can have with the channel* 
> and whether your AGI gets a "HUP" when the channel is hung up.
> 
> While deadagi() is usually executed in the "h" extension, it is not a 
> requirement.
> 
> *) I was curious what the exact differences were so I started reading 
> through ast_waitfor_nandfds(). Unfortunately I have a very low frustration 
> level for code written with single character variable names like c and n.

There is some debate over this but the gist of it is that AGI will send
a kill to your script if the channel is hung up.  DeadAGI won't.

You're now not supposed to run AGI on a channel that dies and not
supposed to run DeadAGI on a live channel.

We've had to split our billing and routing for this, and since doing so
everything has worked fine.

Asterisk 1.6 will not suffer this problem and DeadAGI will be deprecated.

- --
Kind Regards,

Matt Riddell
Director
_______________________________________________

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHbwAJDQNt8rg0Kp4RAjUzAJ9jq1sFitOR7yG//0GgP5A7lvDbBgCfQg3P
n/o4vp6IlSghf2AjNbOFpjU=
=Yp/5
-----END PGP SIGNATURE-----




More information about the asterisk-users mailing list