Howdy,<br><br>I'm working on a macro that authenticates the calling extension against a list of allowed extensions but it looks like the Expression I'm attempting to send of pipe separated extensions is showing up as additional arguments to my macro.<br>
<br>I expected to have 4 arguments to the below macro, Instead it looks like I'm actually getting 6.<br><br>I'm open to suggestions to other ways to do this, I've tried escaping the pipe character without any help.<br>
<br>My Test Macro<br>[macro-jktest1]<br>; ${ARG1} - Org ID/CustGroup<br>; ${ARG2} - Group to use for spying<br>; ${ARG3} - Target to Spy/Barge on<br>; ${ARG4} - Users allowed to use the Macro<br>exten => s,1,Set(OrgID=${ARG1})<br>
exten => s,n,Set(SpyGroup=${ARG2})<br>exten => s,n,Set(Target=${ARG3})<br>exten => s,n,Set(AllowedUsers=${ARG4})<br>exten => s,n,NoOP(AllowedUsers:${AllowedUsers} Arg5:${ARG5} Arg6:${ARG6} )<br>exten => s,n,Set(caller1=${CDR(accountcode)})<br>
exten => s,n,Set(Caller=${CUT(caller1,-,3)})<br>exten => s,n,GotoIf($[${Caller} =~ "${AllowedUsers}"]?ALLOW:DENY)<br>exten => s,n(DENY),Congestion(5)<br>exten => s,n,Hangup<br>exten => s,n(ALLOW),Playback(tt-monkeys)<br>
exten => s,n,Hangup<br><br>Extension that calls the Macro<br><br>
exten => _*3XXXX,1,Macro(jktest1,ls,1,${EXTEN:2},7131|7110|7125)<br>
<br>Console output follows:<br><br clear="all"> -- Executing [*31743@ls-intern:1] Macro("SIP/7124ls-00001b4a", "jktest1|ls|1|1743|7131|7110|7125") in new stack<br> -- Executing [s@macro-jktest1:1] Set("SIP/7124ls-00001b4a", "OrgID=ls") in new stack<br>
-- Executing [s@macro-jktest1:2] Set("SIP/7124ls-00001b4a", "SpyGroup=1") in new stack<br> -- Executing [s@macro-jktest1:3] Set("SIP/7124ls-00001b4a", "Target=1743") in new stack<br>
-- Executing [s@macro-jktest1:4] Set("SIP/7124ls-00001b4a", "AllowedUsers=7131") in new stack<br> -- Executing [s@macro-jktest1:5] NoOp("SIP/7124ls-00001b4a", "AllowedUsers:7131 Arg5:7110 Arg6:7125 ") in new stack<br>
-- Executing [s@macro-jktest1:6] Set("SIP/7124ls-00001b4a", "caller1=ls-000-7124") in new stack<br> -- Executing [s@macro-jktest1:7] Set("SIP/7124ls-00001b4a", "Caller=7124") in new stack<br>
-- Executing [s@macro-jktest1:8] GotoIf("SIP/7124ls-00001b4a", "0?ALLOW:DENY") in new stack<br> -- Goto (macro-jktest1,s,9)<br> -- Executing [s@macro-jktest1:9] Congestion("SIP/7124ls-00001b4a", "5") in new stack<br>
<br>
<br>-- <br>A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>
---Heinlein<br>