VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
gservat at gmail.com Guest
|
Posted: Sat Mar 15, 2008 5:25 pm Post subject: [asterisk-users] Calling a Macro with arguments in AstApplic |
|
|
Hi All,
This question is probably more for the LDAP experienced users/developers as
I'm sure it would work fine if I weren't using LDAP (but I am, and I'm
almost there with the setup!!!).
I've setup an extension with the following:
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
.. which means I'm not able to access these arguments inside the Macro
FWIW, I've defined this Macro in extensions.ael (not .conf).
Any ideas??
Thanks in advance!
- Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080315/c5854fb7/attachment.htm |
|
Back to top |
|
|
gservat at gmail.com Guest
|
Posted: Sat Mar 15, 2008 8:41 pm Post subject: [asterisk-users] Calling a Macro with arguments in AstApplic |
|
|
On Sat, Mar 15, 2008 at 8:25 PM, Gonzalo Servat <gservat at gmail.com> wrote:
Quote: | [..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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|