summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2014-10-12 08:15:30 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2014-10-12 08:15:30 +0000
commit0ebe3d78bc4421c14a20dd2832b7fbb5f39f7ae3 (patch)
treec9096cf8147ef12aa5367997333bbee0558adb9a /channels
parent6644fd46e705450a1e657e61ff95e991ceb85a9c (diff)
chan_sip: Fix so asterisk won't send reINVITE after a BYE.
After a reINVITE glare situation, Asterisk would re-send the reINVITE even though the call had been hung up in the mean time. This patch unschedules the reinvite when handling the BYE. ASTERISK-22791 #close Reported by: Paolo Compagnini Tested by: Paolo Compagnini Review: https://reviewboard.asterisk.org/r/4056/ (testcase is in review r4055) ........ Merged revisions 425296 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 425297 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425298 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@425299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index b02d5b1a4..3c0eb510d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -26514,6 +26514,10 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req)
transmit_response(p, "200 OK", req);
}
+ /* Destroy any pending invites so we won't try to do another
+ * scheduled reINVITE. */
+ AST_SCHED_DEL_UNREF(sched, p->waitid, dialog_unref(p, "decrement refcount from sip_destroy because waitid won't be scheduled"));
+
return 1;
}