[asterisk-bugs] [Asterisk 0014411]: calling Gosub in macro does not work if the invalid extension is triggered

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Feb 5 16:54:25 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14411 
====================================================================== 
Reported By:                klaus3000
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14411
Category:                   Applications/app_macro
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.23 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-02-05 05:39 CST
Last Modified:              2009-02-05 16:54 CST
====================================================================== 
Summary:                    calling Gosub in macro does not work if the invalid
extension is triggered
Description: 
Hi!

Consider the following example:

macro blacklistMakro() {
  Gosub(blacklist_${BLACKLIST}|${MACRO_EXTEN}|1);
  return;
}

context blacklist_SIMPLE {
  _+49. => Hangup();
  i =>Return();
}

If the Gosub call inside the macro triggers the i extension, MACRO_DEPTH
is set to 0, the macro "forgets" that it is a macrom, and does not return
(auto fallthrough happens)


====================================================================== 

---------------------------------------------------------------------- 
 (0099565) Corydon76 (administrator) - 2009-02-05 16:54
 http://bugs.digium.com/view.php?id=14411#c99565 
---------------------------------------------------------------------- 
Show me your dialplan output where this works.  I just mocked it up, and it
behaves the way I documented:

    -- Executing [8144 at digium:1] Gosub("SIP/103-084a0240",
"invalid_wont_work,200,1") in new stack
[Feb  5 16:52:46] ERROR[25454]: app_stack.c:387 gosub_exec: Attempt to
reach a non-existent destination for gosub: (Context:invalid_wont_work,
Extension:200, Priority:0)
  == Spawn extension (digium, 8144, 2) exited non-zero on
'SIP/103-084a0240' 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-05 16:54 Corydon76      Note Added: 0099565                          
======================================================================




More information about the asterisk-bugs mailing list