[asterisk-users] Is it the normal behaviore for AGI and DeadAGI to terminate AFTER the "h" extension?

Bruce B bruceb444 at gmail.com
Sat Apr 9 09:52:34 CDT 2011


Hi Everyone,

Trying to run a php script after DeadAGI for A2Billing does it's magic. This
is the dialplan:

[a2billing]
exten => _X.,1,System(php pre-call.php ${CALLERID(num)} ${EXTEN}
${UNIQUEID})
exten => _X.,n,AGI(a2billing.php,1)
exten => _X.,n,Hangup()
*exten => h,1,Wait(5)*
*exten => h,n,System(php post-call.php ${CALLERID(num)} ${UNIQUEID})*

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".

Is this normal behavioral for AGI/DeadAGI?
Is there a workaround this other than including my post-call script into the
a2billing.php itself?

Output from CLI for proof:

 -- Executing [h at a2billing:1] Wait("SIP/101-00000034", "5") in new stack
    *-- Executing [h at a2billing:2]* System("SIP/101-00000034", "php
post-call.php 101 1302360230.52") in new stack
    -*- <SIP/101-00000034>AGI Script a2billing.php completed, returning -1*
*
*
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110409/9aea151d/attachment.htm>


More information about the asterisk-users mailing list