VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
gonvaled at gonvaled.com Guest
|
Posted: Tue Oct 14, 2014 9:57 am Post subject: [asterisk-users] Do subroutines need their own h extension? |
|
|
Hi all,
According to the documentation (http://www.voip-info.org/wiki/view/Asterisk+h+extension):
Be aware: Macros require their own h extension as they do not make use of the calling context's h extension!
Does this apply to subroutines too? I am unable to find the corresponding explanation.
If not: what happens when a call is hanged-up during the execution of a subroutine? Is the h extension in the parent triggered?
And also: what happens if, in a stack of subroutines, each calling subroutine has an h extension, like this:
sub1,h
sub2,h
sub3,h
If we are in sub3 and the call is hanged up, will all h extensions for the calling stack be triggered?
Thanks and regards,
Daniel Gonzalez |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Tue Oct 14, 2014 11:27 am Post subject: [asterisk-users] Do subroutines need their own h extension? |
|
|
On Tue, Oct 14, 2014 at 9:57 AM, Daniel Gonzalez <gonvaled@gonvaled.com> wrote:
Quote: | Hi all,
According to the documentation
(http://www.voip-info.org/wiki/view/Asterisk+h+extension):
Be aware: Macros require their own h extension as they do not make use of
the calling context's h extension!
Does this apply to subroutines too? I am unable to find the corresponding
explanation.
|
No. A channel that is hung up within a subroutine is treated exactly
the same as if it was hung up in any other extension, i.e., the
channel will execute the 'h' extension in the context that the
subroutine is in.
Quote: |
If not: what happens when a call is hanged-up during the execution of a
subroutine? Is the h extension in the parent triggered?
And also: what happens if, in a stack of subroutines, each calling
subroutine has an h extension, like this:
sub1,h
sub2,h
sub3,h
If we are in sub3 and the call is hanged up, will all h extensions for the
calling stack be triggered?
|
No. There is no unraveling of the stack when a channel is hung up. A
hang up cancels the execution of standard dialplan and does two
things:
(1) Executes the 'h' extension in the current context, if available
(2) Executes any hang up handler subroutines that were attached to the channel
For more information on the latter, see the documentation on Hangup Handlers:
https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers
Matt
--
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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
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
|