|
|
@ -143,13 +143,16 @@ static void hanguptree(struct localuser *outgoing, struct ast_channel *exception
|
|
|
|
if (bleh->cdr) \
|
|
|
|
if (bleh->cdr) \
|
|
|
|
ast_cdr_busy(bleh->cdr); \
|
|
|
|
ast_cdr_busy(bleh->cdr); \
|
|
|
|
numbusy++; \
|
|
|
|
numbusy++; \
|
|
|
|
|
|
|
|
break; \
|
|
|
|
case AST_CAUSE_CONGESTION: \
|
|
|
|
case AST_CAUSE_CONGESTION: \
|
|
|
|
case AST_CAUSE_UNREGISTERED: \
|
|
|
|
case AST_CAUSE_UNREGISTERED: \
|
|
|
|
if (bleh->cdr) \
|
|
|
|
if (bleh->cdr) \
|
|
|
|
ast_cdr_busy(bleh->cdr); \
|
|
|
|
ast_cdr_busy(bleh->cdr); \
|
|
|
|
numcongestion++; \
|
|
|
|
numcongestion++; \
|
|
|
|
|
|
|
|
break; \
|
|
|
|
default: \
|
|
|
|
default: \
|
|
|
|
numnochan++; \
|
|
|
|
numnochan++; \
|
|
|
|
|
|
|
|
break; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} while(0)
|
|
|
|
} while(0)
|
|
|
|
|
|
|
|
|
|
|
@ -162,6 +165,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
|
|
|
|
int numbusy = busystart;
|
|
|
|
int numbusy = busystart;
|
|
|
|
int numcongestion = congestionstart;
|
|
|
|
int numcongestion = congestionstart;
|
|
|
|
int numnochan = nochanstart;
|
|
|
|
int numnochan = nochanstart;
|
|
|
|
|
|
|
|
int prestart = busystart + congestionstart + nochanstart;
|
|
|
|
int cause;
|
|
|
|
int cause;
|
|
|
|
int orig = *to;
|
|
|
|
int orig = *to;
|
|
|
|
struct ast_frame *f;
|
|
|
|
struct ast_frame *f;
|
|
|
@ -185,7 +189,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
|
|
|
|
o = outgoing;
|
|
|
|
o = outgoing;
|
|
|
|
found = -1;
|
|
|
|
found = -1;
|
|
|
|
pos = 1;
|
|
|
|
pos = 1;
|
|
|
|
numlines = 0;
|
|
|
|
numlines = prestart;
|
|
|
|
watchers[0] = in;
|
|
|
|
watchers[0] = in;
|
|
|
|
while(o) {
|
|
|
|
while(o) {
|
|
|
|
/* Keep track of important channels */
|
|
|
|
/* Keep track of important channels */
|
|
|
@ -211,7 +215,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\n");
|
|
|
|
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;
|
|
|
|