Kingsley,<br><br>We have the same - the daemon forks child processes to handle individual calls.<br><br>We need the fastAGI to continue so it can take some further action recording details of the call. This could be done using the &#39;h&#39; extension, but it would be nice to avoid this method for simplicity sake. It does appear that some people can continue after the Dial and we can&#39;t for some reason.<br>

<br><br><div class="gmail_quote">On 22 November 2011 21:21, Kingsley Tart <span dir="ltr">&lt;<a href="mailto:kingsley@skymarket.co.uk">kingsley@skymarket.co.uk</a>&gt;</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;">

When something makes a socket connection to your fastAGI daemon, does<br>
your daemon fork a child process to deal with that connection, or handle<br>
it in the main process?<br>
<br>
I&#39;ve set ours up to fork a child process and detach itself from the<br>
parent socket. When it ends, the child exits (which is what we want) and<br>
the parent stays running (which is also what we want).<br>
<br>
Is there any particular reason you want your fastAGI instance to persist<br>
for the duration of the call?<br>
<br>
Cheers,<br>
Kingsley.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, 2011-11-22 at 14:27 +1100, David Cunningham wrote:<br>
&gt; The strange thing is that we are using fast AGI, and for some reason<br>
&gt; the AGI always exits when the caller hangs up - even when I set HUP to<br>
&gt; IGNORE. If I set HUP to a subroutine that just logs a message, that<br>
&gt; message is never logged.<br>
&gt;<br>
&gt; Thanks for all the help.<br>
&gt;<br>
&gt;<br>
&gt; On 22 November 2011 05:23, Kingsley Tart &lt;<a href="mailto:kingsley@skymarket.co.uk">kingsley@skymarket.co.uk</a>&gt;<br>
&gt; wrote:<br>
&gt;         Yeah fastAGI is great, I&#39;ve been using it for a while for<br>
&gt;         performance<br>
&gt;         reasons but yes I guess it would solve problems like this too.<br>
&gt;<br>
&gt;         Cheers,<br>
&gt;         Kingsley.<br>
&gt;<br>
&gt;         On Mon, 2011-11-21 at 08:34 -0600, Danny Nicholas wrote:<br>
&gt;         &gt; Just offhand, I think you should utilize the FastAGI<br>
&gt;         protocol, since it<br>
&gt;         &gt; doesn&#39;t seem to live or die based on when the call hangs up.<br>
&gt;         Otherwise,<br>
&gt;         &gt; the<br>
&gt;         &gt;   $SIG{&#39;HUP&#39;} = &#39;IGNORE&#39;;<br>
&gt;         &gt; Statement will &quot;separate&quot; the process so it doesn&#39;t die on a<br>
&gt;         hangup.<br>
&gt;         &gt;<br>
&gt;         &gt; -----Original Message-----<br>
&gt;         &gt; From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>
&gt;         &gt; [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>] On Behalf<br>
&gt;         Of Kingsley Tart<br>
&gt;         &gt; Sent: Monday, November 21, 2011 7:54 AM<br>
&gt;         &gt; To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
&gt;         &gt; Subject: Re: [asterisk-users] Continue AGI after Dial()<br>
&gt;         following caller<br>
&gt;         &gt; hang up?<br>
&gt;         &gt;<br>
&gt;         &gt; Yeah I think I slightly misread your original question,<br>
&gt;         which I realised<br>
&gt;         &gt; when I saw Thorsten&#39;s reply. I initially thought you just<br>
&gt;         wanted to avoid<br>
&gt;         &gt; going into the h extension.<br>
&gt;         &gt;<br>
&gt;         &gt; I&#39;m not doing any AGI stuff here that hangs around while the<br>
&gt;         call does stuff<br>
&gt;         &gt; - the AGI process just runs quickly then quits, returning<br>
&gt;         control back to<br>
&gt;         &gt; the dialplan. I had incorrectly assumed you were doing the<br>
&gt;         same.<br>
&gt;         &gt;<br>
&gt;         &gt; Cheers,<br>
&gt;         &gt; Kingsley.<br>
&gt;         &gt;<br>
&gt;         &gt; On Mon, 2011-11-21 at 23:01 +1100, David Cunningham wrote:<br>
&gt;         &gt; &gt; Kingsley,<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; Thanks for the reply, but I am looking to continue within<br>
&gt;         the same AGI<br>
&gt;         &gt; &gt; process and I believe that method would require starting a<br>
&gt;         new AGI.<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; On 21 November 2011 22:22, Kingsley Tart<br>
&gt;         &lt;<a href="mailto:kingsley@skymarket.co.uk">kingsley@skymarket.co.uk</a>&gt;<br>
&gt;         &gt; &gt; wrote:<br>
&gt;         &gt; &gt;         We do that with the &quot;F&quot; option in Dial().<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         &gt;From <a href="http://www.voip-info.org/wiki/view/Asterisk" target="_blank">http://www.voip-info.org/wiki/view/Asterisk</a><br>
&gt;         +cmd+Dial :<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         F(context^exten^pri): When the caller hangs up,<br>
&gt;         transfer the<br>
&gt;         &gt; &gt;         called<br>
&gt;         &gt; &gt;         party to the specified context and extension and<br>
&gt;         continue<br>
&gt;         &gt; &gt;         execution.<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         Cheers,<br>
&gt;         &gt; &gt;         Kingsley.<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         On Mon, 2011-11-21 at 17:38 +1100, David<br>
&gt;         Cunningham wrote:<br>
&gt;         &gt; &gt;         &gt; Hello,<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;         &gt; We would like to continue a Perl AGI after a<br>
&gt;         Dial() it has<br>
&gt;         &gt; &gt;         done<br>
&gt;         &gt; &gt;         &gt; completes following caller hangup. We would like<br>
&gt;         to do this<br>
&gt;         &gt; &gt;         in the<br>
&gt;         &gt; &gt;         &gt; same AGI, and not using a new AGI from the &#39;h&#39;<br>
&gt;         extension. It<br>
&gt;         &gt; &gt;         works<br>
&gt;         &gt; &gt;         &gt; fine when the called party hangs up and the &#39;g&#39;<br>
&gt;         option is<br>
&gt;         &gt; &gt;         used, but<br>
&gt;         &gt; &gt;         &gt; not for caller hangup.<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;         &gt; Is this possible?<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;         &gt; If not a confirmation that this is the case<br>
&gt;         would be very<br>
&gt;         &gt; &gt;         helpful.<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;         &gt; Thanks for any advice!<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;         &gt; --<br>
&gt;         &gt; &gt;         &gt; David Cunningham, Voisonics<br>
&gt;         &gt; &gt;         &gt; <a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>
&gt;         &gt; &gt;         &gt; US toll-free: <a href="tel:%2B1%20888%20842%202720" value="+18888422720">+1 888 842 2720</a><br>
&gt;         &gt; &gt;         &gt; UK: <a href="tel:%2B44%20%280%29%2020%203298%201642" value="+442032981642">+44 (0) 20 3298 1642</a><br>
&gt;         &gt; &gt;         &gt; Australia: <a href="tel:%2B61%20%280%29%202%208063%209019" value="+61280639019">+61 (0) 2 8063 9019</a><br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         &gt; --<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt;<br>
&gt;         _____________________________________________________________________<br>
&gt;         &gt; &gt;         &gt; -- Bandwidth and Colocation Provided by<br>
&gt;         &gt; &gt;         <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt;         &gt; &gt;         &gt; New to Asterisk? Join us for a live introductory<br>
&gt;         webinar<br>
&gt;         &gt; &gt;         every Thurs:<br>
&gt;         &gt; &gt;         &gt;                <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;         &gt; &gt;         &gt;<br>
&gt;         &gt; &gt;         &gt; asterisk-users mailing list<br>
&gt;         &gt; &gt;         &gt; To UNSUBSCRIBE or update options visit:<br>
&gt;         &gt; &gt;         &gt;<br>
&gt;          <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         --<br>
&gt;         &gt; &gt;<br>
&gt;         &gt;<br>
&gt;         _____________________________________________________________________<br>
&gt;         &gt; &gt;         -- Bandwidth and Colocation Provided by<br>
&gt;         &gt; &gt;         <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt;         &gt; &gt;         New to Asterisk? Join us for a live introductory<br>
&gt;         webinar every<br>
&gt;         &gt; &gt;         Thurs:<br>
&gt;         &gt; &gt;                       <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;         asterisk-users mailing list<br>
&gt;         &gt; &gt;         To UNSUBSCRIBE or update options visit:<br>
&gt;         &gt; &gt;<br>
&gt;         <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; --<br>
&gt;         &gt; &gt; David Cunningham, Voisonics<br>
&gt;         &gt; &gt; <a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>
&gt;         &gt; &gt; US toll-free: <a href="tel:%2B1%20888%20842%202720" value="+18888422720">+1 888 842 2720</a><br>
&gt;         &gt; &gt; UK: <a href="tel:%2B44%20%280%29%2020%203298%201642" value="+442032981642">+44 (0) 20 3298 1642</a><br>
&gt;         &gt; &gt; Australia: <a href="tel:%2B61%20%280%29%202%208063%209019" value="+61280639019">+61 (0) 2 8063 9019</a><br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; --<br>
&gt;         &gt; &gt;<br>
&gt;         _____________________________________________________________________<br>
&gt;         &gt; &gt; -- Bandwidth and Colocation Provided by<br>
&gt;         <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt;         &gt; &gt; New to Asterisk? Join us for a live introductory webinar<br>
&gt;         every Thurs:<br>
&gt;         &gt; &gt;                <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; asterisk-users mailing list<br>
&gt;         &gt; &gt; To UNSUBSCRIBE or update options visit:<br>
&gt;         &gt; &gt;    <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;         &gt; --<br>
&gt;         &gt; Cheers,<br>
&gt;         &gt; Kingsley.<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; --<br>
&gt;         &gt;<br>
&gt;         _____________________________________________________________________<br>
&gt;         &gt; -- Bandwidth and Colocation Provided by<br>
&gt;         <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt;         &gt; New to Asterisk? Join us for a live introductory webinar<br>
&gt;         every Thurs:<br>
&gt;         &gt;                <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;         &gt;<br>
&gt;         &gt; asterisk-users mailing list<br>
&gt;         &gt; To UNSUBSCRIBE or update options visit:<br>
&gt;         &gt;    <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; --<br>
&gt;         &gt;<br>
&gt;         _____________________________________________________________________<br>
&gt;         &gt; -- Bandwidth and Colocation Provided by<br>
&gt;         <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt;         &gt; New to Asterisk? Join us for a live introductory webinar<br>
&gt;         every Thurs:<br>
&gt;         &gt;                <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;         &gt;<br>
&gt;         &gt; asterisk-users mailing list<br>
&gt;         &gt; To UNSUBSCRIBE or update options visit:<br>
&gt;         &gt;    <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;<br>
&gt;<br>
&gt;         --<br>
&gt;         _____________________________________________________________________<br>
&gt;         -- Bandwidth and Colocation Provided by<br>
&gt;         <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt;         New to Asterisk? Join us for a live introductory webinar every<br>
&gt;         Thurs:<br>
&gt;                       <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;<br>
&gt;         asterisk-users mailing list<br>
&gt;         To UNSUBSCRIBE or update options visit:<br>
&gt;           <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; David Cunningham, Voisonics<br>
&gt; <a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>
&gt; US toll-free: <a href="tel:%2B1%20888%20842%202720" value="+18888422720">+1 888 842 2720</a><br>
&gt; UK: <a href="tel:%2B44%20%280%29%2020%203298%201642" value="+442032981642">+44 (0) 20 3298 1642</a><br>
&gt; Australia: <a href="tel:%2B61%20%280%29%202%208063%209019" value="+61280639019">+61 (0) 2 8063 9019</a><br>
&gt;<br>
&gt; --<br>
&gt; _____________________________________________________________________<br>
&gt; -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
&gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
&gt;                <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
&gt;<br>
&gt; asterisk-users mailing list<br>
&gt; To UNSUBSCRIBE or update options visit:<br>
&gt;    <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>David Cunningham, Voisonics<br><a 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>