[asterisk-bugs] [JIRA] (ASTERISK-1736) Macros do not clear argument variables when calling other macros
Denis Pantsyrev (JIRA)
noreply at issues.asterisk.org
Tue May 12 02:24:32 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-1736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226187#comment-226187 ]
Denis Pantsyrev commented on ASTERISK-1736:
-------------------------------------------
I think that it's wrong behavior.
Macro2, called from macro1, must not see the arguments passed to macro1.
For the Mark Spencer's comment it must be like:
bq.– Executing NoOp("Zap/1-1", "bar1/") in new stack
instead of
bq.– Executing NoOp("Zap/1-1", "bar1/foo2") in new stack
This behavior makes it difficult to verify the number of arguments passed to the macro
> Macros do not clear argument variables when calling other macros
> ----------------------------------------------------------------
>
> Key: ASTERISK-1736
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-1736
> Project: Asterisk
> Issue Type: Bug
> Components: Core/General
> Reporter: ewieling
> Severity: Minor
>
> You can call a macro from within a macro, however when you do this the ARG* variables are not cleared.
> ****** ADDITIONAL INFORMATION ******
> [default]
> exten => 87,1,Macro(main,FNORD)
> [macro-main]
> exten => s,1,NoOp(macro-main: ARG1=${ARG1})
> exten => s,2,Macro(sub)
>
> [macro-sub]
> exten => s,1,NoOp(macro-sub: ARG1=${ARG1})
> -- Starting simple switch on 'Zap/2-1'
> -- Executing Macro("Zap/2-1", "main|FNORD") in new stack
> -- Executing NoOp("Zap/2-1", "macro-main: ARG1=FNORD") in new stack
> -- Executing Macro("Zap/2-1", "sub") in new stack
> -- Executing NoOp("Zap/2-1", "macro-sub: ARG1=FNORD") in new stack
> -- Hungup 'Zap/2-1'
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list