<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Thanks for the input but I am not sure if that answer my question of if it's normal behaviour for AGI scrip to terminate after the "h" extension rather than end of "x" extension even if it was only run in "x" extension.<div>
<br></div><div>Regards,</div></span><br><div class="gmail_quote">On Mon, Apr 11, 2011 at 6:34 AM, Pezhman Lali <span dir="ltr"><<a href="mailto:lopl@lopl.net">lopl@lopl.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear<div>there is some problem.</div><div>the true way for running php script, is using agi not system.</div><div>second after 5 sec, a lot of channel variables were removed, it makes your program wrong. </div><div>with some little experience you can add your script to a2billing, try it.</div>
<div><br></div><div>best </div><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Sat, Apr 9, 2011 at 7:22 PM, Bruce B <span dir="ltr"><<a href="mailto:bruceb444@gmail.com" target="_blank">bruceb444@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hi Everyone,<div><br></div><div>Trying to run a php script after DeadAGI for A2Billing does it's magic. This is the dialplan:</div><div><br></div><div><div>[a2billing]</div><div>exten => _X.,1,System(php pre-call.php ${CALLERID(num)} ${EXTEN} ${UNIQUEID})</div>
<div>exten => _X.,n,AGI(a2billing.php,1)</div><div>exten => _X.,n,Hangup()</div><div><b>exten => h,1,Wait(5)</b></div><div><b>exten => 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 "h,n" extension is run. I thought this weired because "X" extension is already finished at "X,3".</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("SIP/101-00000034", "5") in new stack</div><div> <b>-- Executing [h@a2billing:2]</b> System("SIP/101-00000034", "php post-call.php 101 1302360230.52") in new stack</div>
<div> -<b>- <SIP/101-00000034>AGI Script a2billing.php completed, returning -1</b></div></div><div><b><br></b></div><div>Thanks,</div>
<br></div></div>--<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></blockquote></div><br></div>
</blockquote></div><br>