[Home]

Summary:ASTERISK-12183: unable to use switch in macro include file
Reporter:Dorian Gray (dorian)Labels:
Date Opened:2008-06-12 14:36:16Date Closed:2011-06-07 14:08:14
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:if switch is used in a macro, instead of passing the correct extension number asterisk passes 's' (and then 't' and then 'h').

if the same switch statement is used directly in extensions.conf, the number is passed perfectly fine.

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

in ext-macros.conf:

[macro-bill-vzout]
switch => ${GLOBAL(VZOUT)}


in extensions.conf:

switch => ${VZOUT}
;exten => _91NXXNXXXXXX,1,Set(call_type=Verizon)
;exten => _91NXXNXXXXXX,2,Macro(bill-vzout,${EXTEN:${OUTBOUNDMSD}},${call_type})

;...
#include <ext-macros.conf>
Comments:By: Tilghman Lesher (tilghman) 2008-06-12 14:44:42

A macro generally uses the 's' extension for everything.  What specifically are you trying to do?  A sample dialplan would help.

By: Dorian Gray (dorian) 2008-06-12 15:29:41

we just have a macro that's used many places and recently had reason to replace all the contents of said macro with switch.

did not realize about the tendency of macros to use s. if that's not likely to change anytime soon, we'll probably just use Dial or figure another way to use switch.

By: Tilghman Lesher (tilghman) 2008-06-12 16:22:22

Sorry, no, that's not going to change.