[asterisk-bugs] [Asterisk 0017265]: NTT Japan will ignore SIP packets with ; received= set in Via SIP header

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Apr 29 19:23:00 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17265 
====================================================================== 
Reported By:                MagicalTux
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17265
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.6 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-04-29 17:57 CDT
Last Modified:              2010-04-29 19:23 CDT
====================================================================== 
Summary:                    NTT Japan will ignore SIP packets with ;received=
set in Via SIP header
Description: 
Asterisk always sets ;received= header when reproducing a Via: header in
copy_via_headers() (near line 9099).
The source says "We should *always* add a received to the topmost via"
without giving more informations. I know for a fact that NTT Japan does not
like this in its SIP session, and will discard packets containing
;received=.

The original one-line-patch for Asterisk 1.2 was proposed on japanese
voip-info. I had to adapt the patch a bit to make it compatible with
Asterisk 1.6 and it indeed helps a lot (without it, asterisk complains it
could not transmit a critical packet when an incoming call is received -
outgoing calls not tried). I confirm that with this patch incoming calls
are working.

Reference:
http://voip-info.jp/index.php/%E3%81%B2%E3%81%8B%E3%82%8A%E9%9B%BB%E8%A9%B1_%E3%83%97%E3%83%AD%E3%83%88%E3%82%B3%E3%83%AB

Basically the patch makes copy_via_headers() think the first Via: header
is already passed so it won't add ;received= if nat=never is set.

While I'm not sure this should be implemented for nat=never (I'm not fully
aware of what this ;received= info does, except making things go wrong in
my case) I believe there should at least be a way to avoid it (maybe a
nat=never,noreceived ?).
====================================================================== 

---------------------------------------------------------------------- 
 (0121199) MagicalTux (reporter) - 2010-04-29 19:23
 https://issues.asterisk.org/view.php?id=17265#c121199 
---------------------------------------------------------------------- 
According to the part of the RFC copied in note 0121197, this requirement
only applies if the received packet contains a domain name, or an IP
address which is not the same as the packet source address.

In the current case the received packet has an IP address and it matches
the packet source address. Depending on how the RFC text is interpreted,
adding "received" in this case is not a requirement.

I guess then I should try to make a patch that will check this condition
(origin is IP and matches origin of packet) before deciding to add
;received= or not, however my knowledge of Asterisk internals is fairly
limited so it might take some time. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-04-29 19:23 MagicalTux     Note Added: 0121199                          
======================================================================




More information about the asterisk-bugs mailing list