[asterisk-users] async agi question

cyr2242 at gmail.com cyr2242 at gmail.com
Mon Apr 13 05:59:05 CDT 2009


Hi Moy,

thanks a lot for your fix, but I'm afraid it doesn't work. I looked your patch over and I realize the code never passes by neither of the two lines you added with "returnstatus = AGI_RESULT_HANGUP". Even, it seems the execution doesn't pass by res_agi.c at all, or at least, it doesn't pass over any "ast_log(LOG_DEBUG,..." lines like the ones your last patch has above the returnstatus fix. Could be the execution is flowing down by an "if - else - break" without an "ast_log(LOG_DEBUG,..." line? In that case, would the "returnstatus = AGI_RESULT_HANGUP" be added to any places more?

Below is the output log for the redirect while playing a file. As you can see, there isn't any res_agi.c output on it:

[Apr 13 11:20:09] DEBUG[5804]: manager.c:2108 process_message: Manager received command 'Redirect'
[Apr 13 11:20:09] DEBUG[5804]: channel.c:1378 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/501-08287a00'
[Apr 13 11:20:09] DEBUG[5815]: channel.c:1793 ast_settimeout: Scheduling timer at 0 sample intervals
[Apr 13 11:20:09] DEBUG[5815]: pbx.c:2448 __ast_pbx_run: Extension 801, priority 0 returned normally even though call was hung up
[Apr 13 11:20:09] DEBUG[5815]: channel.c:1378 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/501-08287a00'
[Apr 13 11:20:09] DEBUG[5815]: channel.c:1477 ast_hangup: Hanging up channel 'SIP/501-08287a00'
[Apr 13 11:20:09] DEBUG[5815]: chan_sip.c:3485 sip_hangup: Hangup call SIP/501-08287a00, SIP callid 2dbe6797392cde921fb7db0b16e81be5 at 10.0.5.20)

However, if the redirect is done without playing a file, the execution does pass by res_agi.c:

[Apr 13 12:03:57] DEBUG[2688]: manager.c:2108 process_message: Manager received command 'Redirect'
[Apr 13 12:03:57] DEBUG[2688]: channel.c:1378 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/501-08279028'
[Apr 13 12:03:57] DEBUG[2755]: res_agi.c:464 launch_asyncagi: No frame read on channel SIP/501-08279028, going out ...
[Apr 13 12:03:57] DEBUG[2755]: pbx.c:2427 __ast_pbx_run: Spawn extension (sip_sercom,500,0) exited non-zero on 'SIP/501-08279028'
[Apr 13 12:03:57]   == Spawn extension (sip_sercom, 500, 0) exited non-zero on 'SIP/501-08279028'

By the way, there's another thing puzzling me: Due you said this AsyncAGI patch was done for asterisk 1.6 and not for asterisk 1.4, and Henrik Westerbeg said it had worked for it as well, (please see: http://lists.digium.com/pipermail/asterisk-users/2008-December/223009.html) then I looked over the last releases at http://bugs.digium.com/bug_view_advanced_page.php?bug_id=11282 for that AsyncAGI patch and I was able to see neither of them have the "returnstatus = AGI_RESULT_HANGUP" either, however, ¡they work! (as Henrik said). 

As you can see, I'm a bit confusing about this subject. I would thank you If you can give any guidelines about it in order to be able to investigate deeper and move forward. 

Thank you very much for your help
Jose M Arias

-- Moises Silva wrote : 
It's a bug in the Async AGI feature. I have created a new patch
http://www.moythreads.com/asterisk-1.4.18-async-agi.patch

Please test it and let me know if it works for you,


--
This message was sent on behalf of cyr2242 at gmail.com at openSubscriber.com
http://www.opensubscriber.com/message/asterisk-users@lists.digium.com/11874935.html



More information about the asterisk-users mailing list