Daniel Gonzalez
2014-Dec-11 15:58 UTC
[asterisk-users] Finish extension (avoid dialplan to silently continue in the next priority of another extension)
Hi,
I have run into a strange behaviour:
[ctx-test]
exten => h,1,NoOp(*** hangup ***)
exten => s,1,NoOp(*** ${EXTEN} ***)
same => n,...
same => n,...
same => n,Hangup()
Strangely, the h extension continues on the priority 2 of the extension s.
Maybe this is caused by the use of same? How can I make sure that an
extension is really ending, something like:
exten => h,1,NoOp(*** hangup ***)
same => n,RellyEndHere()
For subroutines there is the Return() application, but this can not be used
generally in contexts. Is there any application to finish processing the
extension in the context?
Thanks,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20141211/b208fb6c/attachment.html>
Eric Wieling
2014-Dec-11 16:08 UTC
[asterisk-users] Finish extension (avoid dialplan to silently continue in the next priority of another extension)
Hangup handling in Asterisk is horrible enough to make the Buddha cry.
The (mostly working) solution I came up with was
1) Attach a hangup handler to the source channel as soon as possible in the
dialplan to do whatever post call work which needs to be done.
2) Use the ?g? and ?F? options to Dial to play any needed intercept
messages required after one leg of the call hangs up.
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of Daniel Gonzalez
Sent: Thursday, December 11, 2014 10:58 AM
To: Asterisk Users Mailing List
Subject: [asterisk-users] Finish extension (avoid dialplan to silently continue
in the next priority of another extension)
Hi,
I have run into a strange behaviour:
[ctx-test]
exten => h,1,NoOp(*** hangup ***)
exten => s,1,NoOp(*** ${EXTEN} ***)
same => n,...
same => n,...
same => n,Hangup()
Strangely, the h extension continues on the priority 2 of the extension s. Maybe
this is caused by the use of same? How can I make sure that an extension is
really ending, something like:
exten => h,1,NoOp(*** hangup ***)
same => n,RellyEndHere()
For subroutines there is the Return() application, but this can not be used
generally in contexts. Is there any application to finish processing the
extension in the context?
Thanks,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20141211/24532eca/attachment.html>
Matthew Jordan
2014-Dec-11 17:04 UTC
[asterisk-users] Finish extension (avoid dialplan to silently continue in the next priority of another extension)
On Thu, Dec 11, 2014 at 9:58 AM, Daniel Gonzalez <gonvaled at gonvaled.com> wrote:> Hi, > > I have run into a strange behaviour: > > [ctx-test] > > exten => h,1,NoOp(*** hangup ***) > > exten => s,1,NoOp(*** ${EXTEN} ***) > same => n,... > same => n,... > same => n,Hangup() > > Strangely, the h extension continues on the priority 2 of the extension s. > Maybe this is caused by the use of same? How can I make sure that an > extension is really ending, something like: > > exten => h,1,NoOp(*** hangup ***) > same => n,RellyEndHere() > > For subroutines there is the Return() application, but this can not be used > generally in contexts. Is there any application to finish processing the > extension in the context? >Which version of Asterisk are you using? Can you provide a log showing the channel continuing on into the s extension? -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org