[asterisk-bugs] [Asterisk 0014446]: [patch] chan_sip does not support the maddr attribute in Via headers

Asterisk Bug Tracker noreply at bugs.digium.com
Sat May 9 09:08:55 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14446 
====================================================================== 
Reported By:                frawd
Assigned To:                oej
====================================================================== 
Project:                    Asterisk
Issue ID:                   14446
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.23 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-02-10 04:12 CST
Last Modified:              2009-05-09 09:08 CDT
====================================================================== 
Summary:                    [patch] chan_sip does not support the maddr
attribute in Via headers
Description: 
I recently connected Asterisk with a badly configured Nortel CS2K, which
sends me the following Via header:

Via: SIP/2.0/UDP
CS2KSSTEMAG:5060;maddr=213.60.204.48;branch=z9hG4bK-142abd7-ec6f41f2-4aeebdaf

CS2KSSTEMAG not being a valid DNS entry, the reply is never sent (Asterisk
blocks trying to resolve the name). Even tho it is a configuration error,
maddr should be used as reply address.

The attached patch fixes the issue in 1.4.23.1
====================================================================== 

---------------------------------------------------------------------- 
 (0104508) frawd (reporter) - 2009-05-09 09:08
 http://bugs.digium.com/view.php?id=14446#c104508 
---------------------------------------------------------------------- 
ibc, I looked over those RFC 3261 sections (18.2.1 and 18.2.2), and I guess
we are both right and wrong.

In my case, Asterisk should indeed add ";received=SOURCE_IP" to Via
(18.2.1 item 2), but were you are wrong is that having an "maddr" header,
it should route the reply to the IP indicated there (18.2.2 item 3).

If the "maddr" header was not present, it should route replies to the
SOURCE_IP as you say.

As for oej's note about having to parse the rightmost Via-value in a
multiple Via line, and if I understood well the RFC section 7.3, I don't
agree because it appears that:
Via: A
Via: B
is equivalent to:
Via: A, B

So looking at the topmost Via (what we have to do) is equivalent as
looking at the LEFTMOST Via. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-09 09:08 frawd          Note Added: 0104508                          
======================================================================




More information about the asterisk-bugs mailing list