diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-18 21:03:58 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-18 21:03:58 +0000 |
commit | d2396dc21264d569f0d7c9f51785088b50859e5b (patch) | |
tree | 055c87ee71313517cfc1412a9f7532f0575cc916 /pbx.c | |
parent | ac76a04d8332254a2926c16739681759f2a84a39 (diff) |
don't set state to BUSY if the channel is already in the UP state
(issue #7376, backported from trunk)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@34655 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -5432,7 +5432,8 @@ 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); + if (chan->_state != AST_STATE_UP) + ast_setstate(chan, AST_STATE_BUSY); wait_for_hangup(chan, data); return -1; } @@ -5443,7 +5444,8 @@ 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); + if (chan->_state != AST_STATE_UP) + ast_setstate(chan, AST_STATE_BUSY); wait_for_hangup(chan, data); return -1; } |