aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d5dabe19f..2ac7045cf 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5360,7 +5360,9 @@ static int sip_hangup(struct ast_channel *ast)
if (p->trtp)
textqos = ast_rtp_get_quality(p->trtp, NULL, RTPQOS_SUMMARY);
/* 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);
+ }
/* Get RTCP quality before end of call */
if (p->do_history) {