[asterisk-bugs] [Asterisk 0018785]: [patch] Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.)

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Mar 30 02:50:51 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18785 
====================================================================== 
Reported By:                pnlarsson
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18785
Category:                   Channels/chan_sip/Registration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.4.39.1 
JIRA:                       SWP-3080 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-02-10 10:16 CST
Last Modified:              2011-03-30 02:50 CDT
====================================================================== 
Summary:                    [patch] Regression after r297603 (Improve handling
of REGISTER requests with multiple contact headers.)
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 at XX.XX.XX.XX
From: sip:abc at XX.XX.XX.XX;tag=419
Call-ID: 00003d44-07219b5e465f10008e9f0080f0b320bc at 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)) {
====================================================================== 

---------------------------------------------------------------------- 
 (0133172) cutzmf (reporter) - 2011-03-30 02:50
 https://issues.asterisk.org/view.php?id=18785#c133172 
---------------------------------------------------------------------- 
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 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-30 02:50 cutzmf         Note Added: 0133172                          
======================================================================




More information about the asterisk-bugs mailing list