[asterisk-commits] mmichelson: branch 1.6.1 r158084 - in /branches/1.6.1: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Nov 20 11:55:09 CST 2008
Author: mmichelson
Date: Thu Nov 20 11:55:09 2008
New Revision: 158084
URL: http://svn.digium.com/view/asterisk?view=rev&rev=158084
Log:
Merged revisions 158082 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r158082 | mmichelson | 2008-11-20 11:54:31 -0600 (Thu, 20 Nov 2008) | 24 lines
Merged revisions 158071 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r158071 | mmichelson | 2008-11-20 11:48:42 -0600 (Thu, 20 Nov 2008) | 16 lines
We don't handle 4XX responses to BYE well. According to
section 15 of RFC 3261, we should terminate a dialog if we
receive a 481 or 408 in response to our BYE. Since I am aware
of at least one phone manufacturer who may sometimes send a
404 as well, I am being liberal and saying that any 4XX response
to a BYE should result in a terminated dialog.
(closes issue #12994)
Reported by: pabelanger
Patches:
12994.patch uploaded by putnopvut (license 60)
Closes AST-129
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/channels/chan_sip.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=158084&r1=158083&r2=158084
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Thu Nov 20 11:55:09 2008
@@ -16057,6 +16057,20 @@
Fix assigned to Rizzo :-)
*/
/* check_via_response(p, req); */
+
+ /* RFC 3261 Section 15 specifies that if we receive a 408 or 481
+ * in response to a BYE, then we should end the current dialog
+ * and session. There is no mention in the spec of other 4XX responses,
+ * but it is known that at least one phone manufacturer potentially
+ * will send a 404 in response to a BYE, so we'll be liberal in what
+ * we accept and end the dialog and session if we receive any 4XX
+ * response to a BYE.
+ */
+ if (resp >= 400 && resp < 500 && sipmethod == SIP_BYE) {
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ return;
+ }
+
if (p->relatedpeer && p->method == SIP_OPTIONS) {
/* We don't really care what the response is, just that it replied back.
Well, as long as it's not a 100 response... since we might
More information about the asterisk-commits
mailing list