[asterisk-commits] tilghman: branch 1.4 r160480 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 3 08:09:35 CST 2008


Author: tilghman
Date: Wed Dec  3 08:09:35 2008
New Revision: 160480

URL: http://svn.digium.com/view/asterisk?view=rev&rev=160480
Log:
Jon Bonilla (Manwe) pointed out on the -dev list:
"I guess that having only ip-phones in mind is not a good approach. Since it is
possible to have a sip proxy connected to asterisk we could receive a 407
(unauthorized) or 483 (too many hops) as response and dialog ending would not be
a good behavior."
So modified.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=160480&r1=160479&r2=160480
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Dec  3 08:09:35 2008
@@ -12873,13 +12873,12 @@
 
 	/* 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.
+	 * and session.  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 of those responses to a BYE.
 	 */
-	if (resp >= 400 && resp < 500 && sipmethod == SIP_BYE) {
+	if ((resp == 404 || resp == 408 || resp == 481) && sipmethod == SIP_BYE) {
 		ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
 		return;
 	}




More information about the asterisk-commits mailing list