Summary: | ASTERISK-17382: [patch] Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.) | ||
Reporter: | Niklas Larsson (pnlarsson) | Labels: | |
Date Opened: | 2011-02-10 10:16:06.000-0600 | Date Closed: | 2011-05-09 13:55:27 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Registration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) issue18785_enegaard.patch | |
Description: | i found that i could not register after upgrading to 1.4.39. After a bit of searching around i found that this: REGISTER sip:XX.XX.XX.XX:5060 SIP/2.0 Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK0000040d;rport Max-Forwards: 70 To: sip:abc@XX.XX.XX.XX From: sip:abc@XX.XX.XX.XX;tag=419 Call-ID: 00003d44-07219b5e465f10008e9f0080f0b320bc@YY.YY.YY.YY CSeq: 2 REGISTER Contact: * Expires: 0 Authorization: Digest realm="asterisk", nonce="4aa4a0fb", algorithm=MD5, uri="sip:XX.XX.XX.XX:5060", username="abc", response="71e6f91ca165a5a59b0de8fe53a5f9c4" Allow: INVITE,ACK,CANCEL,BYE,PRACK,OPTIONS,REGISTER,INFO,UPDATE User-Agent: Panasonic-MPR10-VSIPGW/V2.0501 Content-Length: 0 fails with: [Feb 10 14:50:19] WARNING[2232] chan_sip.c: Failed to parse contact info [Feb 10 14:50:19] VERBOSE[2232] logger.c: <--- Transmitting (NAT) to YY.YY.YY.YY:5060 ---> SIP/2.0 400 Bad Request this works before r297603 and the commit msg: The changes here attempt to more strictly follow RFC 3261 section 10.3. Basically the following will now cause a 400 Bad Response to be returned, if: - multiple Contact headers are present with one set to expire all bindings ("*") - wildcard parameter is specified for Contact without Expires header or Expires header is not set to zero. This line looks interesting, if single_binding_found is set we fail even if expires is 0: if (wildcard_found && (ast_strlen_zero(expires) || expiry != 0 || single_binding_found)) { | ||
Comments: | By: Eric Negaard (enegaard) 2011-02-22 09:34:26.000-0600 I see this issue in Asterisk 1.8.2.2 as well. I believe it is due to the fact that the single_instance_found variable is not initialized correctly. I will attach a patch that should fix the problem. By: cutzmf (cutzmf) 2011-03-30 02:50:51 Asterisk 1.6.2.17.2. All peers are registred. But i have warnings ... [Mar 30 11:35:23] WARNING[1908] chan_sip.c: Failed to parse contact info [Mar 30 11:36:18] WARNING[1908] chan_sip.c: Failed to parse contact info [Mar 30 11:37:14] WARNING[1908] chan_sip.c: Failed to parse contact info [Mar 30 11:38:09] WARNING[1908] chan_sip.c: Failed to parse contact info [Mar 30 11:39:04] WARNING[1908] chan_sip.c: Failed to parse contact info [Mar 30 11:39:59] WARNING[1908] chan_sip.c: Failed to parse contact info ... etc By: Digium Subversion (svnbot) 2011-05-06 12:59:10 Repository: asterisk Revision: 317719 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r317719 | rmudgett | 2011-05-06 12:59:09 -0500 (Fri, 06 May 2011) | 11 lines Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.) Uninitialized variable. (issue ASTERISK-15900) (closes issue ASTERISK-17382) Reported by: pnlarsson Patches: issue18785_enegaard.patch uploaded by enegaard (license 1197) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=317719 By: Digium Subversion (svnbot) 2011-05-06 13:03:14 Repository: asterisk Revision: 317720 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r317720 | rmudgett | 2011-05-06 13:03:13 -0500 (Fri, 06 May 2011) | 18 lines Merged revisions 317719 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r317719 | rmudgett | 2011-05-06 12:59:05 -0500 (Fri, 06 May 2011) | 11 lines Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.) Uninitialized variable. (issue ASTERISK-15900) (closes issue ASTERISK-17382) Reported by: pnlarsson Patches: issue18785_enegaard.patch uploaded by enegaard (license 1197) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=317720 By: Richard Mudgett (rmudgett) 2011-05-06 13:03:53 Issue ASTERISK-15900 already fixed this for v1.8 and trunk. |