[Home]

Summary:ASTERISK-23736: Async AGI loop breaks when AGI command returns FAILURE
Reporter:Chico Manobela (manobela)Labels:
Date Opened:2014-05-13 01:14:18Date Closed:2014-05-13 01:24:54
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_agi
Versions:SVN 1.8.27.0 11.9.0 12.2.0 Frequency of
Occurrence
Constant
Related
Issues:
is the original version of this clone:ASTERISK-23727 Async AGI loop breaks when trying to stream missing file
Environment:CentOS 5Attachments:
Description:trying to stream a non existent file using AsyncAGI results in AsyncAGI loop breaks and control returns to dial plan.

to reproduce:
1. start async agi loop on call - AGI(agi:async)
2. from the cli try to stream file that doesn't exists:
{noformat}
asterisk*CLI> agi exec SIP/192.168.10.22-00000020 "STREAM FILE x 5"
{noformat}
Asterisk will print the normal warning:
{noformat}
[May  8 11:24:58] WARNING[6805][C-00000020]: file.c:701 ast_openstream_full: File x does not exist in any format
<SIP/192.168.10.22-00000020>AGI Tx >> 200 result=-1 endpos=0
   -- Executing [talk@pbxtel-incoming-async:3]
{noformat}
Next thing asterisk does is to stop the loop and continue the dial plan:
{noformat}
Hangup("SIP/192.168.10.22-00000020", "") in new stack
 == Spawn extension (pbxtel-incoming-async, talk, 3) exited non-zero on 'SIP/192.168.10.22-00000020'
{noformat}

Since Asterisk 1.6 AGI script should continue to execute even after hangup, the behavior for AGI and AsyncAGI should be as similar as possible.
AgiExec event has the information needed for the user to take action.
The only thing that should stop the AsyncAgi script is async agi break request from the AMI.
Comments: