I've got a very nice PHP AGI script but I want to be able to do some database cleanup when the user hangs up the phone. I wish everyone would hang up when they were suposed to, but some people don't. So what does Asterisk send to an AGI file when the line has been disconnected? If I remember reading somewhere correctly, I don't need to use DeadAGI. Instead I'm able to use normal AGI but I just need to catch a SIGTERM or something like that and process it. Does anyone here have any PHP examples of this, maybe? -- /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071206/65744f15/attachment.htm
Nicholas Blasgen wrote:> I've got a very nice PHP AGI script but I want to be able to do some > database cleanup when the user hangs up the phone. I wish everyone would > hang up when they were suposed to, but some people don't. So what does > Asterisk send to an AGI file when the line has been disconnected?SIGHUP> If I > remember reading somewhere correctly, I don't need to use DeadAGI. Instead > I'm able to use normal AGI but I just need to catch a SIGTERM or something > like that and process it.You need to catch it or the script will terminate. Not sure if this is possible at all in PHP. I think there's an inofficial POSIX module which can do it. Perl can do it for sure. Regards, Philipp
On Thu, 6 Dec 2007, Nicholas Blasgen wrote:> I've got a very nice PHP AGI script but I want to be able to do some > database cleanup when the user hangs up the phone. I wish everyone would > hang up when they were suposed to, but some people don't. So what does > Asterisk send to an AGI file when the line has been disconnected? If I > remember reading somewhere correctly, I don't need to use DeadAGI. Instead > I'm able to use normal AGI but I just need to catch a SIGTERM or something > like that and process it.When the user hangs up, your AGI will receive a HUP. Thanks in advance, ------------------------------------------------------------------------ Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000