diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-10 12:13:51 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-10 12:13:51 +0000 |
commit | e01ba05fde7d8965f3342de02c4d0d74aace5dd9 (patch) | |
tree | e6aea2fd6dd3d4d12b18e080fd392db0e3ed8869 | |
parent | dc3df96d393aa3f7407e3b360a775ba9b443b0f8 (diff) |
Issue #5937 - Make sure SIP CANCEL's are re-transmitted
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@12495 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4563b68b6..dba901c5e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2447,13 +2447,15 @@ static int sip_hangup(struct ast_channel *ast) if (!ast_test_flag(p, SIP_ALREADYGONE) && !ast_strlen_zero(p->initreq.data)) { if (needcancel) { /* Outgoing call, not up */ if (ast_test_flag(p, SIP_OUTGOING)) { + /* stop retransmitting an INVITE that has not received a response */ + __sip_pretend_ack(p); + + /* Send a new request: CANCEL */ transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, 1, 0); /* Actually don't destroy us yet, wait for the 487 on our original INVITE, but do set an autodestruct just in case we never get it. */ ast_clear_flag(&locflags, SIP_NEEDDESTROY); - sip_scheddestroy(p, 15000); - /* stop retransmitting an INVITE that has not received a response */ - __sip_pretend_ack(p); + sip_scheddestroy(p, 32000); if ( p->initid != -1 ) { /* channel still up - reverse dec of inUse counter only if the channel is not auto-congested */ |