Good day, <br><br>I'm using a dial string as follows: Dial(SIP/${phonenumber},30,grM(screen^${pin})L(${300000}[:60000]));<br>When I set a variable in the macro screen, it doesn't get passed back to the extension from where the dial was called. I can always put the result in the MySQL database, but that feels a bit overkill... the macro looks as follows: <br>
<br>macro screen (arg1) {<br><br> Wait(0.2);<br> Read(acceptcall|sounds/pin|7);<br> if(${acceptcall} = ${arg1}) {<br> NoOp(connect them);<br> wrongpin=0;<br> } else {<br> Set(MACRO_RESULT=CONTINUE);<br> wrongpin=1;<br>
}<br> NoOp(MACRO_RESULT = ${MACRO_RESULT});<br><br>}<br><br>This is the output from the CLI, and I can see that the wrongpin is set to 1, but when I do a NoOp right after leaving the macro, it says its empty...<br><br>
-- Executing [s@connect:36] Dial("SIP/1003-b7619b78", "SIP/1203|30|grM(screen^1234)L(300000[:60000])") in new stack<br> -- Limit Data for this call:<br> > timelimit = 300000<br> > play_warning = 60000<br>
> play_to_caller = yes<br> > play_to_callee = yes<br> > warning_freq = 0<br> > start_sound = (null)<br> > warning_sound = beep<br> > end_sound = beep<br> -- Called 1203<br>
-- SIP/1203-08d62408 is ringing<br> -- SIP/1203-08d62408 answered SIP/1003-b7619b78<br> -- Executing [s@macro-screen:1] Set("SIP/1203-08d62408", "arg1=1234") in new stack<br> -- Executing [s@macro-screen:2] Wait("SIP/1203-08d62408", "0.2") in new stack<br>
-- Executing [s@macro-screen:3] Read("SIP/1203-08d62408", "acceptcall|sounds/pin|7") in new stack<br> -- Accepting a maximum of 7 digits.<br> -- <SIP/1203-08d62408> Playing 'sounds/pin' (language 'en')<br>
-- User entered '1'<br> -- Executing [s@macro-screen:4] GotoIf("SIP/1203-08d62408", "0?5:8") in new stack<br> -- Goto (macro-screen,s,8)<br> -- Executing [s@macro-screen:8] Set("SIP/1203-08d62408", "MACRO_RESULT=CONTINUE") in new stack<br>
-- Executing [s@macro-screen:9] Set("SIP/1203-08d62408", "wrongpin=1") in new stack<br> -- Executing [s@macro-screen:10] NoOp("SIP/1203-08d62408", "Finish if-screen-32753") in new stack<br>
-- Executing [s@macro-screen:11] NoOp("SIP/1203-08d62408", "MACRO_RESULT = CONTINUE") in new stack<br> -- Executing [s@connect:37] NoOp("SIP/1003-b7619b78", "DIALSTATUS:ANSWER") in new stack<br>
-- Executing [s@connect:38] NoOp("SIP/1003-b7619b78", "wrongpin=") in new stack<br><br>Is there a good way to pass this variable back to the context "connect"? <br><br>Thanks, <br>Best regards, <br>
Tobias<br>