diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-10 16:30:40 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-10 16:30:40 +0000 |
commit | 13d8cb38c2875a2633abedd7969b90be2653085c (patch) | |
tree | fe12f0de1699ca71bfc58a14af2148173bd3e053 /channels | |
parent | 1930b59e6aacaeaa2271c61fe18c084b468ddc05 (diff) |
Merged revisions 234129 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r234129 | tilghman | 2009-12-10 10:24:26 -0600 (Thu, 10 Dec 2009) | 16 lines
Merged revisions 234095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r234095 | tilghman | 2009-12-10 10:08:20 -0600 (Thu, 10 Dec 2009) | 9 lines
When we receive no response at all to our INVITE, allow the channel to be destroyed.
(closes issue #15627)
Reported by: falves11
Patches:
20091209__issue15627__1.6.0.diff.txt uploaded by tilghman (license 14)
20091209__issue15627__1.4.diff.txt uploaded by tilghman (license 14)
Tested by: falves11
Review: https://reviewboard.asterisk.org/r/446/
(closes issue #15716)
Reported by: dant
(closes issue #16270)
Reported by: corruptor
(closes issue #15356)
Reported by: falves11
(issue #16382)
Reported by: lftsy
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@234133 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 725b1fbbc..5fa8695a7 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5372,6 +5372,9 @@ static int auto_congest(const void *arg) ast_queue_control(p->owner, AST_CONTROL_CONGESTION); ast_channel_unlock(p->owner); } + + /* Give the channel a chance to act before we proceed with destruction */ + sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); } sip_pvt_unlock(p); dialog_unref(p, "unreffing arg passed into auto_congest callback (p->initid)"); @@ -6057,19 +6060,20 @@ static int sip_hangup(struct ast_channel *ast) if (needcancel) { /* Outgoing call, not up */ if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) { /* stop retransmitting an INVITE that has not received a response */ - struct sip_pkt *cur; - for (cur = p->packets; cur; cur = cur->next) { - __sip_semi_ack(p, cur->seqno, cur->is_resp, cur->method ? cur->method : find_sip_method(cur->data->str)); - } - /* if we can't send right now, mark it pending */ if (p->invitestate == INV_CALLING) { /* We can't send anything in CALLING state */ ast_set_flag(&p->flags[0], SIP_PENDINGBYE); - /* Do we need a timer here if we don't hear from them at all? */ + __sip_pretend_ack(p); + /* Do we need a timer here if we don't hear from them at all? Yes we do or else we will get hung dialogs and those are no fun. */ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); append_history(p, "DELAY", "Not sending cancel, waiting for timeout"); } else { + struct sip_pkt *cur; + + for (cur = p->packets; cur; cur = cur->next) { + __sip_semi_ack(p, cur->seqno, cur->is_resp, cur->method ? cur->method : find_sip_method(cur->data->str)); + } p->invitestate = INV_CANCELLED; /* Send a new request: CANCEL */ transmit_request(p, SIP_CANCEL, p->lastinvite, XMIT_RELIABLE, FALSE); |