Summary: | ASTERISK-06317: Unable to assign channel variable to macro agument inside a macro | ||
Reporter: | mike240se (mike240se) | Labels: | |
Date Opened: | 2006-02-15 02:10:49.000-0600 | Date Closed: | 2006-02-17 10:32:48.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/Configuration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | This is not major, but since there is no option for a caller to press an extension and have it handled in a macro, i tried assigning a channel variable to a macro argument. It will not work, i have tried many things, it says its setting it but the following noop shows an empty variable. So. [example-macro] ; Lets say ${ARG2} is 601 Set(_SOMEVAR=${ARG2} - CLI says setting SOMEVAR to 601 NoOp(${SOMEVAR}) - displays "" | ||
Comments: | By: Peng Yong (ppyy) 2006-02-15 06:06:39.000-0600 i test it, and it's ok in 1.2.4 and trunk: [macro-test] exten => s,1,Set(_SOMEVAR=${ARG1}) exten => s,n,NoOp(${SOMEVAR}) exten => s,n,Dial(${ARG1},,t) -- Executing Macro("SIP/222.185.245.254-081cd718", "test|SIP/8386") in new stack -- Executing Set("SIP/222.185.245.254-081cd718", "_SOMEVAR=SIP/8386") in new stack -- Executing NoOp("SIP/222.185.245.254-081cd718", "SIP/8386") in new stack -- Executing Dial("SIP/222.185.245.254-081cd718", "SIP/8386||t") in new stack By: mike240se (mike240se) 2006-02-15 11:35:33.000-0600 Can you please try to assign from ${ARG2} since that was what I was using, instead of ARG1... I was running plain 1.2.4 and could produce every time. Weird. Please let me know your results and if you dont have problems i will ask to close this and i will look into it By: Peng Yong (ppyy) 2006-02-15 12:02:15.000-0600 no problem with ${ARG2}, tested in 1.2 and brunch -- Executing Macro("SIP/222.185.245.254-081ce4b8", "test|SIP/8386| 601") in new stack -- Executing Set("SIP/222.185.245.254-081ce4b8", "_SOMEVAR= 601") in new stack -- Executing NoOp("SIP/222.185.245.254-081ce4b8", " 601") in new stack -- Executing Dial("SIP/222.185.245.254-081ce4b8", "SIP/8386||t") in new stack By: Tilghman Lesher (tilghman) 2006-02-15 12:05:03.000-0600 mike240se: are you sure you have an ARG2? Are you perhaps mistaking the macro name as ARG1 (it isn't)? A sample dialplan (including Macro call) would help. By: mike240se (mike240se) 2006-02-15 16:18:22.000-0600 Since no one else is seeing this problem, I am going to upload a sample of my dialplan asap. By: Tilghman Lesher (tilghman) 2006-02-17 10:32:47.000-0600 Reopen if/when you have an extensions.conf to upload. |