[asterisk-bugs] [Asterisk 0008556]: Large SIP messages are truncated to 4096 bytes

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Jan 28 13:32:59 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=8556 
====================================================================== 
Reported By:                mikma
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   8556
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 48373 
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             12-10-2006 17:05 CST
Last Modified:              01-28-2008 13:32 CST
====================================================================== 
Summary:                    Large SIP messages are truncated to 4096 bytes
Description: 
According to RFC 3261, SIP implementations MUST be able to handle messages
up
to 65535 bytes.
Asterisk currently can't handle SIP messages larger than 4096 bytes
excluding IP and UDP headers. Larger messages are truncated.

RFC 3261, Section 18.1.1 Sending Requests

   However,
   implementations MUST be able to handle messages up to the maximum
   datagram packet size.  For UDP, this size is 65,535 bytes, including
   IP and UDP headers.

====================================================================== 

---------------------------------------------------------------------- 
 jamesgolovich - 01-28-08 13:32  
---------------------------------------------------------------------- 
I was thinking a bit about my branch to solve this, and I think I'm going
to change it so it initially uses 512 as the size of the ast_str.  There
might be a better size to use, but I suspect that on average most packets
are less than 512 bytes so there isn't any reason to basically malloc 4096
bytes when only a small bit is used.  The ast_str code will expand the size
if it needs more space.

Maybe I'll take a look and see what the average size of packets are on my
test box. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-28-08 13:32  jamesgolovich  Note Added: 0081286                          
======================================================================




More information about the asterisk-bugs mailing list