Scott Gifford
2009-Jul-24 20:13 UTC
[asterisk-users] Goto from a feature macro is not working?
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).
The documentation for Macro on voip-info.org seems to say that using
Goto from a macro is fine:
http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro
This is with Asterisk 1.4.26.
Any idea why this is happening, or any ideas how to work around it?
What I'm really looking for is an attended transfer where all three
parties are on the line together at the end, then the attending
operator can drop off when everything is confirmed. Maybe there's an
easier way to do that?
Thanks!
----Scott.
Danny Nicholas
2009-Jul-24 20:22 UTC
[asterisk-users] Goto from a feature macro is not working?
Try replacing the "," with "|". Shouldn't make any
difference, but it is a
future deprecation if I remember correctly.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Scott Gifford
Sent: Friday, July 24, 2009 3:14 PM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Goto from a feature macro is not working?
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).
The documentation for Macro on voip-info.org seems to say that using
Goto from a macro is fine:
http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro
This is with Asterisk 1.4.26.
Any idea why this is happening, or any ideas how to work around it?
What I'm really looking for is an attended transfer where all three
parties are on the line together at the end, then the attending
operator can drop off when everything is confirmed. Maybe there's an
easier way to do that?
Thanks!
----Scott.
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Miguel Molina
2009-Jul-24 20:49 UTC
[asterisk-users] Goto from a feature macro is not working?
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
Tzafrir Cohen schrieb:> On Sat, Jul 25, 2009 at 01:03:27PM +0200, Philipp Kempgen wrote: > >> == extensions.conf: >> >> exten => 30,1,Set(x=5) >> exten => 30,n,While($[${x} <= 9]) >> exten => 30,n,NoOp(x ist ${x}) >> exten => 30,n,ExecIf($[${x} > 5],ExitWhile) >> exten => 30,n,Playback(beep) >> exten => 30,n,Set(x=$[${x} + 1]) >> exten => 30,n,EndWhile() >> exten => 30,n,NoOp(done) >> >> == extensions.ael: >> >> 30 => { >> x=0; >> while (${x} <= 9) { >> NoOp(x ist ${x}); >> if (${x} > 5) { >> break; >> } >> Playback(beep); >> y=${x} + 1; > > AEL is so easy that you managed to err with it :-poops :-)>> } >> NoOp(done); >> }Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de --