summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-06-14 23:22:53 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-06-14 23:22:53 +0000
commitf8746d0009d7f54eb55fe804d320b30e628ad9bb (patch)
tree207388fca29fa5a75d0a6c6651d3b19f694480f1 /main/channel.c
parentaaa591447d908ef41404e75b7ed350eef56f905f (diff)
Allow non-normal execution routines to be able to run on hungup channels.
* Make non-normal dialplan execution routines be able to run on a hung up channel. This is preparation work for hangup handler routines. * Fixed ability to support relative non-normal dialplan execution routines. (i.e., The context and exten are optional for the specified dialplan location.) Predial routines are the only non-normal routines that it makes sense to optionally omit the context and exten. Setting a hangup handler also needs this ability. * Fix Return application being able to restore a dialplan location exactly. Channels without a PBX may not have context or exten set. * Fixes non-normal execution routines like connected line interception and predial leaving the dialplan execution stack unbalanced. Errors like missing Return statements, popping too many stack frames using StackPop, or an application returning non-zero could leave the dialplan stack unbalanced. * Fixed the AGI gosub application so it cleans up the dialplan execution stack and handles the autoloop priority increments correctly. * Eliminated the need for the gosub_virtual_context return location. Review: https://reviewboard.asterisk.org/r/1984/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c
index 6b3621dae..b9fc0b5d8 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -5729,7 +5729,7 @@ int ast_pre_call(struct ast_channel *chan, const char *sub_args)
return res;
}
ast_channel_unlock(chan);
- return ast_app_exec_sub(NULL, chan, sub_args);
+ return ast_app_exec_sub(NULL, chan, sub_args, 0);
}
int ast_call(struct ast_channel *chan, const char *addr, int timeout)
@@ -9801,7 +9801,7 @@ int ast_channel_connected_line_sub(struct ast_channel *autoservice_chan, struct
}
ast_channel_unlock(sub_chan);
- retval = ast_app_run_sub(autoservice_chan, sub_chan, sub, sub_args);
+ retval = ast_app_run_sub(autoservice_chan, sub_chan, sub, sub_args, 0);
if (!retval) {
struct ast_party_connected_line saved_connected;
@@ -9844,7 +9844,7 @@ int ast_channel_redirecting_sub(struct ast_channel *autoservice_chan, struct ast
}
ast_channel_unlock(sub_chan);
- retval = ast_app_run_sub(autoservice_chan, sub_chan, sub, sub_args);
+ retval = ast_app_run_sub(autoservice_chan, sub_chan, sub, sub_args, 0);
if (!retval) {
struct ast_party_redirecting saved_redirecting;