<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Thanks for the response.</div><div><br></div><div>Asterisk logs the execution of the AGI and script completed messages within the same second, so less than a second. </div><div><br></div><div>--</div><div>Mehmet</div><br><div><div>On Sep 24, 2011, at 3:34 PM, Sam Govind wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">How much time your AGI is taking? Check if it is completing its task and not killed by asterisk. I guess we've 6~7 seconds before asterisk kills all call channel and related tasks.<br><br><div class="gmail_quote">On Sat, Sep 24, 2011 at 3:21 PM, Mehmet Avcioglu <span dir="ltr"><<a href="mailto:mehmet@activecom.net">mehmet@activecom.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div class="im"><br>
On Sep 23, 2011, at 8:01 PM, Mehmet Avcioglu wrote:<br>
> I have an AGI script that occasionally disappears without completing its action and asterisk logs the following.<br>
><br>
> <Local/0123456@context-f46e;1>AGI Script script.php completed, returning 4<br>
> Spawn extension (context, 0123456, 2) exited non-zero on 'Local/0123456@context-f46e;1'<br>
<br>
</div>I also changed the dialplan and added a line to print AGISTATUS, but when this "returning 4" happens, asterisk stops there and doesn't execute any further dialplan actions, so I don't even see AGISTATUS value.<br>
<br>
exten => h,1,AGI(script.php,${ANSWEREDTIME},,,)<br>
exten => h,n,NoOp(${AGISTATUS})<br>
<br>
Executing [h@context:1] AGI("Local/0123456@context-4b79;1", "script.php,13,,,") in new stack<br>
<Local/0123456@context-4b79;1>AGI Script script.php completed, returning 4<br>
Spawn extension (context, h, 1) exited non-zero on 'Local/0123456@context-4b79;1'</blockquote></div></blockquote></div></body></html>