<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I use an AGI with PHP. Here is a short snippet:<br>
<br>
<font face="Courier New, Courier, monospace">[...]<br>
declare(ticks = 1);<br>
pcntl_signal(SIGHUP, array($this, "signal_handler"));<br>
[...]<br>
public function signal_handler($signal_number)<br>
{<br>
$this->log_message("debug", "Signal catched:
signo=$signal_number");<br>
<br>
switch($signal_number) {<br>
case SIGHUP:<br>
// signal for hangup (comes from asterisk)<br>
$this->log_message("debug", "Hangup
detected.");<br>
exit(0);<br>
break;<br>
<br>
default:<br>
$this->log_message("error", "Undefined signal
'".$signal_number."'.");<br>
break;<br>
}<br>
}</font><br>
<br>
Work for me. Give it a try.<br>
<br>
Best regards,<br>
-Thorsten-<br>
<br>
Am 21.11.2011 13:00, schrieb David Cunningham:
<blockquote
cite="mid:CAHGbP-811WnT16krUNbohA=6ihjQT7FE8eCz=d_kDNZZNTh6og@mail.gmail.com"
type="cite">Thorsten,<br>
<br>
We have SIGHUP set to 'IGNORE', but it still does not continue the
AGI after the Dial(). Do you have any idea why that might happen?<br>
<br>
Thanks for your advice.<br>
<br>
<br>
<div class="gmail_quote">
On 21 November 2011 22:19, Thorsten Göllner <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:tg@ovm-group.com">tg@ovm-group.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#FFFFFF" text="#000000"> If the caller hangs up
Asterisk sends a SIGHUP. You can catch the signal and do
whatever you want to do.<br>
<br>
Am 21.11.2011 07:38, schrieb David Cunningham:
<blockquote type="cite">
<div>
<div class="h5">Hello,<br>
<br>
We would like to continue a Perl AGI after a Dial() it
has done completes following caller hangup. We would
like to do this in the same AGI, and not using a new
AGI from the 'h' extension. It works fine when the
called party hangs up and the 'g' option is used, but
not for caller hangup.<br>
<br>
Is this possible?<br>
<br>
If not a confirmation that this is the case would be
very helpful.<br>
<br>
Thanks for any advice!<br clear="all">
<br>
</div>
</div>
</blockquote>
<span class="HOEnZb"><font color="#888888">
<pre cols="72">--
Thorsten Göllner
OVM Office Voice Media GmbH
Herderstrasse 68
40237 Düsseldorf
Tel.: <a moz-do-not-send="true" href="tel:%2B49%280%29211%20%2F%20618%2057%2053" value="+492116185753" target="_blank">+49(0)211 / 618 57 53</a>
Fax: <a moz-do-not-send="true" href="tel:%2B49%280%29211%20%2F%20618%2057%2054" value="+492116185754" target="_blank">+49(0)211 / 618 57 54</a></pre>
</font></span></div>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
David Cunningham, Voisonics<br>
<a moz-do-not-send="true" href="http://voisonics.com/"
target="_blank">http://voisonics.com/</a><br>
US toll-free: +1 888 842 2720<br>
UK: +44 (0) 20 3298 1642<br>
Australia: +61 (0) 2 8063 9019<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<br>
</body>
</html>