[Home]

Summary:ASTERISK-12690: Revision 141028 (to resolve issue #11979) breaks compatibility with some agi scripts
Reporter:Francesco Romano (francesco_r)Labels:
Date Opened:2008-09-06 07:26:14Date Closed:2008-09-12 14:00:40
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Resources/res_agi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) recordingcheck
( 1) recordingcheck.txt
Description:For example the recordingcheck agi script of FreePBX (present to see if a call need to be recorded) block the dialing of every extension. The call is hangup after the execution of this agi.

This is the relative part of extensions.conf:
[macro-exten-vm]
exten => s,1,Macro(user-callerid)
exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(CFBEXT=${DB(CFB/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] |["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)
exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})

****** ADDITIONAL INFORMATION ******

With version 141028 the console output with agi debug is:
   -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
AGI Tx >> agi_request: recordingcheck
AGI Tx >> agi_channel: IAX2/lab-casa-9494
AGI Tx >> agi_language: it
AGI Tx >> agi_type: IAX2
AGI Tx >> agi_uniqueid: 1220703118.218
AGI Tx >> agi_callerid: unknown
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 67
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: macro-record-enable
AGI Tx >> agi_extension: s
AGI Tx >> agi_priority: 4
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << GET VARIABLE ARG2
AGI Tx >> 200 result=1 (IN)
AGI Rx << GET VARIABLE ARG1
AGI Tx >> 200 result=1 (503)
AGI Rx << DATABASE GET "AMPUSER" "503/recording"
AGI Tx >> 200 result=1 (out=Adhoc|in=Adhoc)
AGI Rx << VERBOSE "Inbound recording not enabled" 1
 recordingcheck|20080906-141158|1220703118.218: Inbound recording not enabled
AGI Tx >> 200 result=1
   -- AGI Script recordingcheck completed, returning 0
 == Spawn extension (macro-record-enable, s, 4) exited non-zero on 'IAX2/lab-casa-9494' in macro 'record-enable'
 == Spawn extension (macro-record-enable, s, 4) exited non-zero on 'IAX2/lab-casa-9494' in macro 'exten-vm'
 == Spawn extension (macro-record-enable, s, 4) exited non-zero on 'IAX2/lab-casa-9494'


With Asterisk 1.4.22 is:
   -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
AGI Tx >> agi_request: recordingcheck
AGI Tx >> agi_channel: IAX2/lab-casa-2242
AGI Tx >> agi_language: it
AGI Tx >> agi_type: IAX2
AGI Tx >> agi_uniqueid: 1220703479.0
AGI Tx >> agi_callerid: unknown
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 67
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: macro-record-enable
AGI Tx >> agi_extension: s
AGI Tx >> agi_priority: 4
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << GET VARIABLE ARG2
AGI Tx >> 200 result=1 (IN)
AGI Rx << GET VARIABLE ARG1
AGI Tx >> 200 result=1 (503)
AGI Rx << DATABASE GET "AMPUSER" "503/recording"
AGI Tx >> 200 result=1 (out=Adhoc|in=Adhoc)
AGI Rx << VERBOSE "Inbound recording not enabled" 1
 recordingcheck|20080906-141759|1220703479.0: Inbound recording not enabled
AGI Tx >> 200 result=1
   -- AGI Script recordingcheck completed, returning 0
   -- Executing [s@macro-record-enable:5] NoOp("IAX2/lab-casa-2242", "No recording needed") in new stack
   -- Executing [s@macro-exten-vm:9] Macro("IAX2/lab-casa-2242", "dial|30|twk|503") in new stack
   -- Executing [s@macro-dial:1] GotoIf("IAX2/lab-casa-2242", "1?dial") in new stack
   -- Goto (macro-dial,s,3)
   -- Executing [s@macro-dial:3] AGI("IAX2/lab-casa-2242", "dialparties.agi") in new stack
and dialplan continue normally.
Comments:By: Francesco Romano (francesco_r) 2008-09-06 08:13:31

Sorry for attaching two times the same agi script but the bug tracker give me an error during the upload, only after i see the files were loaded successfully.
Also in the additional note i wrote asterisk 1.4.22, but it was asterisk 1.4.21.2.

By: Tilghman Lesher (tilghman) 2008-09-06 10:20:55

Fix committed in revision 141503.

By: Digium Subversion (svnbot) 2008-09-06 11:13:27

Repository: asterisk
Revision: 141503

U   branches/1.4/res/res_agi.c

------------------------------------------------------------------------
r141503 | tilghman | 2008-09-06 11:13:27 -0500 (Sat, 06 Sep 2008) | 4 lines

Reverting behavior change (AGI should not exit non-zero on SUCCESS)
(closes issue ASTERISK-12690)
Reported by: francesco_r

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=141503