<div>Hi Moy,</div>
<div> </div>
<div>thank you for your answer and this new testasync2.diff. It matches better my mind about the subject. </div>
<div><br>I tried it out and it worked fine. The execution went right this time, as you can see at bottom this mail.</div>
<div> </div>
<div>
<div>A last question: would you apply this fix to asterisk-async-AGI-rev92324.patch for asterisk 1.6? do you think it would be useful too? I think so.</div>
<div> </div>
<div>Anyway, thanks a lot for your help. Tell me if you need to test anymore and, as I said before, don&#39;t hesitate contact me for whatever help can need. <br><br>Best regards.<br>Jose<br><br><br>[Apr 17 09:40:39] DEBUG[1363]: manager.c:2108 process_message: Manager received command &#39;AGI&#39;<br>
[Apr 17 09:40:39]     -- Playing &#39;es/demo-congrats&#39; (escape_digits=1) (sample_offset 0)<br>[Apr 17 09:40:39] DEBUG[1402]: rtp.c:2753 ast_rtp_write: Ooh, format changed from unknown to alaw<br>[Apr 17 09:40:39] DEBUG[1402]: rtp.c:2770 ast_rtp_write: Created smoother: format: 8 ms: 20 len: 160<br>
[Apr 17 09:40:39] DEBUG[1402]: channel.c:1793 ast_settimeout: Scheduling timer at 160 sample intervals<br>[Apr 17 09:40:45] DEBUG[1363]: manager.c:2108 process_message: Manager received command &#39;Redirect&#39;<br>[Apr 17 09:40:45] DEBUG[1363]: channel.c:1378 ast_softhangup_nolock: Soft-Hanging up channel &#39;SIP/502-08288f98&#39;<br>
[Apr 17 09:40:45] DEBUG[1402]: channel.c:1793 ast_settimeout: Scheduling timer at 0 sample intervals<br>[Apr 17 09:40:45] DEBUG[1402]: res_agi.c:439 launch_asyncagi: ast_check_hangup returned true after handling command on chan SIP/502-08288f98 (softhangup = 0x2)<br>
[Apr 17 09:40:45] DEBUG[1402]: res_agi.c:497 launch_asyncagi: launch_asyncagi returned (0x4) for chan SIP/502-08288f98<br>[Apr 17 09:40:45] DEBUG[1402]: pbx.c:2427 __ast_pbx_run: Spawn extension (sip_sercom,801,0) exited non-zero on &#39;SIP/502-08288f98&#39;<br>
[Apr 17 09:40:45]   == Spawn extension (sip_sercom, 801, 0) exited non-zero on &#39;SIP/502-08288f98&#39;<br>[Apr 17 09:40:45] DEBUG[1402]: pbx.c:1831 pbx_extension_helper: Launching &#39;NoOp&#39;<br>[Apr 17 09:40:45]     -- Executing [801@sip_sercom:1] NoOp(&quot;SIP/502-08288f98&quot;, &quot;entrada numeracion del 8 801&quot;) in new stack<br>
[Apr 17 09:40:45] DEBUG[1402]: pbx.c:1831 pbx_extension_helper: Launching &#39;AGI&#39;<br>[Apr 17 09:40:45]     -- Executing [801@sip_sercom:2] AGI(&quot;SIP/502-08288f98&quot;, &quot;agi:async&quot;) in new stack</div></div>

<div> </div>
<div><br> </div>
<div class="gmail_quote">2009/4/16 Moises Silva <span dir="ltr"><a href="mailto:moises.silva@gmail.com">moises.silva@gmail.com</a></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">This can be tricky, I did not spend much time looking at different<br>return codes. My reasoning was that returnstatus |=<br>agi_handle_command() should preserve the command return status and<br>return it to the caller (just as I saw was done for regular AGI), but<br>
also preserve the AGI status. However, taking a second look at the<br>code and definitions of AST_PBX_KEEPALIVE, I think my fix is wrong,<br>probably I just broke the &quot;break asyncagi&quot; AGI command and it seems<br>
the AST_PBX_KEEPALIVE code is not even used by the caller, just<br>ignored. Can you help me to test something else?<br><br><a href="http://moythreads.com/testasync2.diff" target="_blank">http://moythreads.com/testasync2.diff</a><br>
<br>Let me know if it works,<br><br>Moy<br></div></blockquote></div><br>