summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-04-20 16:04:37 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-04-20 16:04:37 +0000
commitb43f4a60ddf00ca242d95488bc31fd8ea7fc5b9f (patch)
tree5df8cf8c91eafd79d84e00f2ea30672aa4e1cf40 /main
parent34d670f786215c54855cf87e7ffb67c8c2007ac8 (diff)
* Add more information to some messages in __ast_pbx_run().
* Simplify some dialplan priority setting code in ast_explicit_goto() because of opaquification. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/pbx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/main/pbx.c b/main/pbx.c
index a694e44f6..bab87c423 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -5271,15 +5271,16 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c,
*/
if (ast_exists_extension(c, ast_channel_context(c), "i", 1,
S_COR(ast_channel_caller(c)->id.number.valid, ast_channel_caller(c)->id.number.str, NULL))) {
- ast_verb(3, "Sent into invalid extension '%s' in context '%s' on %s\n", ast_channel_exten(c), ast_channel_context(c), ast_channel_name(c));
+ ast_verb(3, "Channel '%s' sent to invalid extension: context,exten,priority=%s,%s,%d\n",
+ ast_channel_name(c), ast_channel_context(c), ast_channel_exten(c), ast_channel_priority(c));
pbx_builtin_setvar_helper(c, "INVALID_EXTEN", ast_channel_exten(c));
set_ext_pri(c, "i", 1);
} else if (ast_exists_extension(c, ast_channel_context(c), "e", 1,
S_COR(ast_channel_caller(c)->id.number.valid, ast_channel_caller(c)->id.number.str, NULL))) {
raise_exception(c, "INVALID", 1);
} else {
- ast_log(LOG_WARNING, "Channel '%s' sent into invalid extension '%s' in context '%s', but no invalid handler\n",
- ast_channel_name(c), ast_channel_exten(c), ast_channel_context(c));
+ ast_log(LOG_WARNING, "Channel '%s' sent to invalid extension but no invalid handler: context,exten,priority=%s,%s,%d\n",
+ ast_channel_name(c), ast_channel_context(c), ast_channel_exten(c), ast_channel_priority(c));
error = 1; /* we know what to do with it */
break;
}
@@ -8305,11 +8306,11 @@ int ast_explicit_goto(struct ast_channel *chan, const char *context, const char
if (!ast_strlen_zero(exten))
ast_channel_exten_set(chan, exten);
if (priority > -1) {
- ast_channel_priority_set(chan, priority);
/* see flag description in channel.h for explanation */
if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP)) {
- ast_channel_priority_set(chan, ast_channel_priority(chan) - 1);
+ --priority;
}
+ ast_channel_priority_set(chan, priority);
}
ast_channel_unlock(chan);