summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-06-22 21:51:05 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-06-22 21:51:05 +0000
commit30a417dc6cbbf0e58da7b6b33498c5413c6cd430 (patch)
tree8d2652859f151f19ba6deb605bf762ced4121ff3 /apps/app_queue.c
parent3d1e26d2d2ca906910532a90f0a6af80db4d0fa3 (diff)
Fix F and F(x) action logic in Queue application.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index c7cd40a91..430647bba 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5474,20 +5474,17 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
}
if (!ast_check_hangup(peer) && ast_test_flag(&opts, OPT_CALLEE_GO_ON)) {
+ int goto_res;
+
if (!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
ast_replace_subargument_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
-
- if (ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]) == AST_PBX_SUCCESS) {
- ast_pbx_start(peer);
- } else {
- ast_hangup(peer);
- }
+ goto_res = ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
} else { /* F() */
- if (ast_goto_if_exists(peer, caller_context, caller_extension, caller_priority + 1) == AST_PBX_GOTO_FAILED) {
- ast_hangup(peer);
- } else {
- ast_pbx_start(peer);
- }
+ goto_res = ast_goto_if_exists(peer, caller_context, caller_extension,
+ caller_priority + 1);
+ }
+ if (goto_res || ast_pbx_start(peer)) {
+ ast_hangup(peer);
}
} else {
ast_hangup(peer);