summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-11-06 05:00:42 +0000
committerMark Spencer <markster@digium.com>2005-11-06 05:00:42 +0000
commit535ed63c6ff21634216e1a9df06bc66a3c07b2f7 (patch)
tree0c246fff52c38fd5ecfe303226495c1ccc776f81 /apps/app_dial.c
parent34152c3abc278647a7d8d011f943c3ee53f18c0b (diff)
Dial janitor patch (bug #5613)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rwxr-xr-xapps/app_dial.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 7778ead1c..5b6192835 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -70,11 +70,7 @@ static char *descrip =
"If a timeout is not specified, the Dial application will wait indefinitely\n"
"until either one of the called channels answers, the user hangs up, or all\n"
"channels return busy or error. In general, the dialer will return 0 if it\n"
-"was unable to place the call, or the timeout expired. However, if all\n"
-"channels were busy, and there exists an extension with priority n+101 (where\n"
-"n is the priority of the dialer instance), then it will be the next\n"
-"executed extension (this allows you to setup different behavior on busy from\n"
-"no-answer).\n"
+"was unable to place the call, or the timeout expired. \n"
" For the Privacy and Screening Modes, the DIALSTATUS variable will be set to DONTCALL, \n"
"if the called party chooses to send the calling party to the 'Go Away' script, and \n"
"the DIALSTATUS variable will be set to TORTURE, if the called party wants to send the caller to \n"
@@ -116,7 +112,7 @@ static char *descrip =
" Also, the macro can set the MACRO_RESULT variable to do the following:\n"
" -- ABORT - Hangup both legs of the call.\n"
" -- CONGESTION - Behave as if line congestion was encountered.\n"
-" -- BUSY - Behave as if a busy signal was encountered. (n+101)\n"
+" -- BUSY - Behave as if a busy signal was encountered. (n+101 only if those options are set)\n"
" -- CONTINUE - Hangup the called party and continue on in the dialplan.\n"
" -- GOTO:<context>^<exten>^<priority> - Transfer the call.\n"
" 'n' -- modifier for screen/privacy mode. No intros are to be saved in the priv-callerintros dir.\n"
@@ -1421,9 +1417,12 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if ((macro_result = pbx_builtin_getvar_helper(peer, "MACRO_RESULT"))) {
if (!strcasecmp(macro_result, "BUSY")) {
ast_copy_string(status, macro_result, sizeof(status));
- if (!ast_goto_if_exists(chan, NULL, NULL, chan->priority + 101)) {
+ if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
+ if (!ast_goto_if_exists(chan, NULL, NULL, chan->priority + 101)) {
+ ast_set_flag(peerflags, OPT_GO_ON);
+ }
+ } else
ast_set_flag(peerflags, OPT_GO_ON);
- }
res = -1;
}
else if (!strcasecmp(macro_result, "CONGESTION") || !strcasecmp(macro_result, "CHANUNAVAIL")) {