[asterisk-users] Goto from a feature macro is not working?
Miguel Molina
mmolina at millenium.com.co
Fri Jul 24 15:49:37 CDT 2009
Scott Gifford escribió:
> Hello,
>
> I'm trying to implement multi-party calls according to these
> instructions:
>
> http://www.voip-info.org/wiki/view/Asterisk+n-way+call+HOWTO
>
> They are almost working, except that the Goto at the end of
> [dynamic-nway-start] doesn't seem to work. When I turn verbosity up a
> bit, I get something like this in my error log:
>
> == Channel 'SIP/SWG-0085a180' jumping out of macro 'nway-start'
>
> and then the SIP line is hung up, with no further dialplan steps
> logged for that line.
>
> Writing a small test case to see what's going on, I get the same
> behavior:
>
> ; extensions.conf
> [macro-test1]
> exten => s,1,Goto(macro-test1a,s,1)
>
> [macro-test1a]
> exten => s,1,NoOp
>
> ; features.conf
> macro-test1 => *1,self/both,Macro,test1
>
> When I activeate this feature with *1, I get:
>
> -- Executing [s at macro-test1:1] Goto("SIP/SWG-007f9280","macro-test1a|s|1") in new stack
> -- Goto (macro-test1a,s,1)
> == Channel 'SIP/SWG-007f9280' jumping out of macro 'test1'
>
> then nothing else about this (though the line isn't disconnected).
>
I just ran into a similar problem, I needed a "macro" spreaded over
several contexts because it's kind of a part of an IVR. I switched to
GoSob() and Return() applications
(http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Gosub) and
everything goes fine now. The only thing to be sure is that you Return()
in *every* case from the Macro context(s), to avoid unknown and
undesirable results of your calls.
Macro() won't work out of the macro context, if you Goto() away from the
Macro() context, it will finish returning inmediately to the next
priority where it was originally called, just like it's happening on
your test call.
Finally that's one of the reasons why Macro() got deprecated in favor of
the better GoSub() one.
Cheers,
--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090724/ef9d239f/attachment.htm
More information about the asterisk-users
mailing list