aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-18 21:03:58 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-18 21:03:58 +0000
commitd2396dc21264d569f0d7c9f51785088b50859e5b (patch)
tree055c87ee71313517cfc1412a9f7532f0575cc916 /pbx.c
parentac76a04d8332254a2926c16739681759f2a84a39 (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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index c45ec8e3b..ad57810a9 100644
--- a/pbx.c
+++ b/pbx.c
@@ -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;
}