Hi Everyone,<div><br></div><div>Trying to run a php script after DeadAGI for A2Billing does it&#39;s magic. This is the dialplan:</div><div><br></div><div><div>[a2billing]</div><div>exten =&gt; _X.,1,System(php pre-call.php ${CALLERID(num)} ${EXTEN} ${UNIQUEID})</div>

<div>exten =&gt; _X.,n,AGI(a2billing.php,1)</div><div>exten =&gt; _X.,n,Hangup()</div><div><b>exten =&gt; h,1,Wait(5)</b></div><div><b>exten =&gt; h,n,System(php post-call.php ${CALLERID(num)} ${UNIQUEID})</b></div></div>

<div><br></div><div>As you can see above, I even added a 5 seconds wait time before running my post-call script but the problem is that DeadAGI and AGI actually terminates after the &quot;h,n&quot; extension is run. I thought this weired because &quot;X&quot; extension is already finished at &quot;X,3&quot;.</div>

<div><br></div><div>Is this normal behavioral for AGI/DeadAGI?</div><div>Is there a workaround this other than including my post-call script into the a2billing.php itself?</div><div><br></div><div>Output from CLI for proof:</div>

<div><br></div><div><div> -- Executing [h@a2billing:1] Wait(&quot;SIP/101-00000034&quot;, &quot;5&quot;) in new stack</div><div>    <b>-- Executing [h@a2billing:2]</b> System(&quot;SIP/101-00000034&quot;, &quot;php post-call.php 101 1302360230.52&quot;) in new stack</div>

<div>    -<b>- &lt;SIP/101-00000034&gt;AGI Script a2billing.php completed, returning -1</b></div></div><div><b><br></b></div><div>Thanks,</div>