diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-16 06:25:26 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-16 06:25:26 +0000 |
commit | ac241207a517b21b6ce60bfecce9e174c30f1d0c (patch) | |
tree | 41cdd60a1dd856b353e485ec9d1c7bc183487333 | |
parent | 061f59c391a40772ee64c68ab909dd836c3e7f42 (diff) |
Don't force a busy state that will break channel signalling if the channel
already is up. (Reported by Steve Davies in e-mail, waiting for 1.2 approval)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34433 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | pbx.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4938,7 +4938,10 @@ static int pbx_builtin_ringing(struct ast_channel *chan, void *data) static int pbx_builtin_busy(struct ast_channel *chan, void *data) { ast_indicate(chan, AST_CONTROL_BUSY); - ast_setstate(chan, AST_STATE_BUSY); + /* Don't change state of an UP channel, just indicate + busy in audio */ + if (chan->_state != AST_STATE_UP) + ast_setstate(chan, AST_STATE_BUSY); wait_for_hangup(chan, data); return -1; } @@ -4949,7 +4952,10 @@ static int pbx_builtin_busy(struct ast_channel *chan, void *data) static int pbx_builtin_congestion(struct ast_channel *chan, void *data) { ast_indicate(chan, AST_CONTROL_CONGESTION); - ast_setstate(chan, AST_STATE_BUSY); + /* Don't change state of an UP channel, just indicate + congestion in audio */ + if (chan->_state != AST_STATE_UP) + ast_setstate(chan, AST_STATE_BUSY); wait_for_hangup(chan, data); return -1; } |