[asterisk-users] Calling a Macro with arguments in AstApplication/AstApplicationData
Gonzalo Servat
gservat at gmail.com
Sat Mar 15 20:41:12 CDT 2008
On Sat, Mar 15, 2008 at 8:25 PM, Gonzalo Servat <gservat at gmail.com> wrote:
> [..snip..]
>
> AstExtension: 210
> AstApplication: Macro
> AstApplicationData: call-ext,SIP/testuser&IAX2/testuser,210
>
> When I dial this extension, I see the following in the log:
>
> -- Executing Macro("SIP/testuser-082b11f8",
> "call-ext,SIP/testuser&IAX2/testuser,210")
> [Mar 15 16:14:06] DEBUG[6060]: pbx.c:2679 pbx_extension_helper: Launching
> 'Set'
> -- Executing [s at macro-call-ext:1] Set("SIP/testuser-remote-082b11f8",
> "LOCAL(arg1)=SIP/testuser&IAX2/testuser") in new stack
> [Mar 15 16:14:06] ERROR[6060]: app_stack.c:370 local_write: Tried to set
> LOCAL(arg1), but we aren't within a Gosub routine
Found a solution to this so I'm replying to myself just incase anyone else
runs into this problem. Probably not the best solution but it works. Since
I'm using AEL, pbx_ael creates the macro for me in the dialplan and it
automatically adds:
Set(LOCAL(argument)=value);
.. for every macro argument. Turns out I can just use ${ARG1} and ${ARG2}
(etc) in the macro itself and it works fine!
Best regards,
Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080315/b24b6844/attachment.htm
More information about the asterisk-users
mailing list