[Home]

Summary:ASTERISK-14280: Macro() returns to wrong extension
Reporter:Bastian Schern (schern)Labels:
Date Opened:2009-06-08 04:36:53Date Closed:2011-06-07 14:00:29
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_macro
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Under some circumstances the Macro() application returns back to wrong extension.

E.g.:
Executing [h@macro-PSTN:1] Macro("SIP/...-00803ff0", "DBDisconnect")
Executing [s@macro-DBDisconnect:1] GosubIf("SIP/...-00803ff0", "?free_sth|1")
Executing [s@macro-DBDisconnect:2] GotoIf("SIP/...-00803ff0", "?disconnect|1")
Executing [s@macro-DBDisconnect:3] NoOp("SIP/...-00803ff0", "")
Executing [s@macro-PSTN:2] DeadAGI("SIP/...-1-00803ff0", "...")

The Error is the last line. This should be look like this:
Executing [h@macro-PSTN:2] GotoIf("SIP/...-1-00803ff0", "...")



****** STEPS TO REPRODUCE ******

This error occurs in the 1.4 releases since 1.4.24. In Asterisk <= 1.4.23.2 and the 1.6 releases the error is not present.

The error occurs randomly. I think it raises if I have more than 3 parallel calls on the machine.

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

Involved parts of the extensions.conf:

[macro-PSTN]
   exten => s,1,Set(CDR(userfield)=${SIPUSERAGENT})
   exten => s,n,DeadAGI(...)
   exten => s,n,Hangup

   include => default



[default]
   exten => h,1,Macro(DBDisconnect)
   exten => h,2,GotoIf($["${DIALSTATUS}" != "ANSWER"]?h-${DIALSTATUS},1)

   exten => h-BUSY,1,Busy(${DEF_TIMEOUT_BUSY})
   exten => h-CONGESTION,1,Congestion(${DEF_TIMEOUT_CONGESTION})
   exten => h-,1,Congestion(${DEF_TIMEOUT_CONGESTION})
   exten => _h-.,1,Congestion(${DEF_TIMEOUT_CONGESTION})

   exten => i,1,Hangup()
   exten => s,1,Hangup()
   exten => T,1,Hangup()
   exten => t,1,Hangup()
Comments:By: Leif Madsen (lmadsen) 2009-06-08 07:28:51

I have a feeling what you were experiencing before was actually a bug, and that bug has now been fixed, and you've been caught in the crossfire. I think the documentation to the Macro() application was also recently updated to reflect this change ('core show application Macro').

I've assigned to Tilghman to confirm what I've said though, as this could still be a bug.

By: Bastian Schern (schern) 2009-06-09 12:34:31

Between version 1.4.23.2 and 1.4.24.1 the documentation was not changed.
The bug is also in the 1.4.26-rc1 and the documentation is not changed neither.

By: Tilghman Lesher (tilghman) 2009-06-09 13:11:12

The previous behavior was a bug and a regression.  It was fixed.