<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Scott Gifford escribi&oacute;:
<blockquote cite="mid:lybpn9ltzk.fsf@gfn.org" type="cite">
  <pre wrap="">Hello,

I'm trying to implement multi-party calls according to these
instructions:

    <a class="moz-txt-link-freetext" href="http://www.voip-info.org/wiki/view/Asterisk+n-way+call+HOWTO">http://www.voip-info.org/wiki/view/Asterisk+n-way+call+HOWTO</a>

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 =&gt; s,1,Goto(macro-test1a,s,1)
    
    [macro-test1a]
    exten =&gt; s,1,NoOp

    ; features.conf
    macro-test1 =&gt; *1,self/both,Macro,test1

When I activeate this feature with *1, I get:

    -- Executing [s@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).
  </pre>
</blockquote>
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
(<a class="moz-txt-link-freetext" href="http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Gosub">http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Gosub</a>) and
everything goes fine now. The only thing to be sure is that you
Return() in <b>every</b> case from the Macro context(s), to avoid
unknown and undesirable results of your calls.<br>
<br>
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.<br>
<br>
Finally that's one of the reasons why Macro() got deprecated in favor
of the better GoSub() one.<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">-- 
Ing. Miguel Molina
Grupo de Tecnolog&iacute;a
Millenium Phone Center
</pre>
</body>
</html>