Add alternate queueing strategies. Implment ringall, roundrobin, and random

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-07-30 16:10:51 +00:00
parent c8edb6ab5d
commit 21b6696e8b
3 changed files with 211 additions and 66 deletions

View File

@@ -178,7 +178,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
winner = ast_waitfor_n(watchers, pos, to);
o = outgoing;
while(o) {
if (o->stillgoing && (o->chan->_state == AST_STATE_UP)) {
if (o->stillgoing && o->chan && (o->chan->_state == AST_STATE_UP)) {
if (!peer) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s answered %s\n", o->chan->name, in->name);
@@ -206,7 +206,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
o->stillgoing = 0;
ast_hangup(o->chan);
o->chan = NULL;
numbusies++;
numbusies++;
}
continue;
}