[asterisk-bugs] [Asterisk 0011783]: Via header in responses might get truncated

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Jan 21 09:58:25 CST 2008


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11783 
====================================================================== 
Reported By:                ofirroval
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   11783
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            sometimes
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           Addons 1.4.5 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-17-2008 05:03 CST
Last Modified:              01-21-2008 09:58 CST
====================================================================== 
Summary:                    Via header in responses might get truncated
Description: 
Following some interoperability tests we did between Asterisk and Avaya
equipment, I noticed that the Via header in responses sometimes get
truncated.

For example, here is a Via header taken from a request sent from Avaya
server to Asterisk:
Via: SIP/2.0/UDP
149.49.82.150:5060;branch=z9hG4bK838383030303333333460.0,SIP/2.0/TLS
149.49.82.150:6002;psrrposn=2;received=149.49.82.150;branch=z9hG4bK803034a38b7dc15a1477a6e6600,SIP/2.0/TCP
149.49.82.150:6005;psrrposn=1;received=149.49.82.150;branch=z9hG4bK984ad723672d6072

A provisional response from Asterisk to this request had the following Via
header:
Via: SIP/2.0/UDP
149.49.82.150:5060;branch=z9hG4bK838383030303333333460.0;received=149.49.82.150,SIP/2.0/TLS
149.49.82.150:6002;psrrposn=2;received=149.49.82.150;branch=z9hG4bK803034a38b7dc15a1477a6e6600,SIP/2.0/TCP
149.49.82.150:6005;psrrposn=1;received=149.4

Note that on the last Via segment, the "received" parameter is truncated
and the "branch" parameter is missing.

I noticed that this behavior is somehow related to the lengths of "branch"
parameters, and possibly the overall length of the Via header.
I believe it can be easily reproduced using some simple sipp scenario.

Since I am not an Asterisk developer I don't have further insight on this
issue but I would gladly supply more information if needed.
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 01-21-08 09:58  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 99301

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r99301 | file | 2008-01-21 09:58:24 -0600 (Mon, 21 Jan 2008) | 4 lines

Bump the buffer size for Via headers up to 512. There are some
exceptionally large Via headers out there.
(closes issue http://bugs.digium.com/view.php?id=11783)
Reported by: ofirroval

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=99301 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-21-08 09:58  svnbot         Checkin                                      
01-21-08 09:58  svnbot         Note Added: 0080936                          
01-21-08 09:58  svnbot         Status                   new => assigned     
01-21-08 09:58  svnbot         Assigned To               => file            
======================================================================




More information about the asterisk-bugs mailing list