mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
fix DIALSTATUS issue (bug #2989)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -146,17 +146,17 @@ static void hanguptree(struct localuser *outgoing, struct ast_channel *exception
|
|||||||
|
|
||||||
#define AST_MAX_WATCHERS 256
|
#define AST_MAX_WATCHERS 256
|
||||||
|
|
||||||
#define HANDLE_CAUSE(blah, bleh) do { \
|
#define HANDLE_CAUSE(cause, chan) do { \
|
||||||
switch(cause) { \
|
switch(cause) { \
|
||||||
case AST_CAUSE_BUSY: \
|
case AST_CAUSE_BUSY: \
|
||||||
if (bleh->cdr) \
|
if (chan->cdr) \
|
||||||
ast_cdr_busy(bleh->cdr); \
|
ast_cdr_busy(chan->cdr); \
|
||||||
numbusy++; \
|
numbusy++; \
|
||||||
break; \
|
break; \
|
||||||
case AST_CAUSE_CONGESTION: \
|
case AST_CAUSE_CONGESTION: \
|
||||||
case AST_CAUSE_UNREGISTERED: \
|
case AST_CAUSE_UNREGISTERED: \
|
||||||
if (bleh->cdr) \
|
if (chan->cdr) \
|
||||||
ast_cdr_busy(bleh->cdr); \
|
ast_cdr_busy(chan->cdr); \
|
||||||
numcongestion++; \
|
numcongestion++; \
|
||||||
break; \
|
break; \
|
||||||
default: \
|
default: \
|
||||||
@@ -212,7 +212,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
|
|||||||
if (found < 0) {
|
if (found < 0) {
|
||||||
if (numlines == (numbusy + numcongestion + numnochan)) {
|
if (numlines == (numbusy + numcongestion + numnochan)) {
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose( VERBOSE_PREFIX_2 "Everyone is busy/congested at this time\n");
|
ast_verbose( VERBOSE_PREFIX_2 "Everyone is busy/congested at this time (%d:%d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
|
||||||
if (numbusy)
|
if (numbusy)
|
||||||
strncpy(status, "BUSY", statussize - 1);
|
strncpy(status, "BUSY", statussize - 1);
|
||||||
else if (numcongestion)
|
else if (numcongestion)
|
||||||
@@ -224,7 +224,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
|
|||||||
in->priority+=100;
|
in->priority+=100;
|
||||||
} else {
|
} else {
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose( VERBOSE_PREFIX_2 "No one is available to answer at this time (%d, %d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
|
ast_verbose( VERBOSE_PREFIX_2 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
|
||||||
}
|
}
|
||||||
*to = 0;
|
*to = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user