diff options
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 35ca1409f..4d89ae03c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6060,7 +6060,9 @@ static int sip_hangup(struct ast_channel *ast) } /* Send a hangup */ - transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1); + if (oldowner->_state == AST_STATE_UP) { + transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1); + } } else { /* Note we will need a BYE when this all settles out |