Index: apps/app_dial.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v retrieving revision 1.94.2.6 diff -u -r1.94.2.6 app_dial.c --- apps/app_dial.c 27 Feb 2005 01:40:43 -0000 1.94.2.6 +++ apps/app_dial.c 14 Apr 2005 16:52:43 -0000 @@ -88,7 +88,8 @@ " * LIMIT_CONNECT_FILE File to play when call begins.\n" " * LIMIT_WARNING_FILE File to play as warning if 'y' is defined.\n" " 'timeleft' is a special sound macro to auto-say the time \n" -" left and is the default.\n\n" +" left and is the default.\n" +" 'n' -- Do not jump to n+101 if all of the channels were busy.\n\n" " In addition to transferring the call, a call may be parked and then picked\n" "up by another user.\n" " The optional URL will be sent to the called party if the channel supports it.\n" @@ -134,7 +135,7 @@ #define AST_MAX_WATCHERS 256 -static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect_in, int *allowdisconnect_out, int *sentringing, char *status, size_t statussize) +static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect_in, int *allowdisconnect_out, int *sentringing, int *nojump, char *status, size_t statussize) { struct localuser *o; int found; @@ -186,7 +187,7 @@ else if (numnochan) strncpy(status, "CHANUNAVAIL", statussize - 1); /* See if there is a special busy message */ - if (ast_exists_extension(in, in->context, in->exten, in->priority + 101, in->callerid)) + if (!*nojump && ast_exists_extension(in, in->context, in->exten, in->priority + 101, in->callerid)) in->priority+=100; } else { if (option_verbose > 2) @@ -461,6 +462,7 @@ int playargs=0, sentringing=0, moh=0; int digit = 0; time_t start_time, answer_time, end_time; + int nojump = 0; if (!data) { ast_log(LOG_WARNING, "Dial requires an argument (technology1/number1&technology2/number2...|optional timeout|options)\n"); @@ -663,7 +665,9 @@ privacy = 1; } else if (strchr(transfer, 'C')) { resetcdr = 1; - } + } else if (strchr(transfer, 'n')) { + nojump = 1; + } } if (resetcdr && chan->cdr) ast_cdr_reset(chan->cdr, 0); @@ -884,7 +888,7 @@ strncpy(status, "CHANUNAVAIL", sizeof(status) - 1); time(&start_time); - peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect_in, &allowdisconnect_out, &sentringing, status, sizeof(status)); + peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect_in, &allowdisconnect_out, &sentringing, &nojump, status, sizeof(status)); if (!peer) { if (to)