[asterisk-bugs] [Asterisk 0014929]: [patch] blank lines in _sip_tcp_helper_thread caused by sip dummy packages

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Sep 10 14:37:40 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14929 
====================================================================== 
Reported By:                vrban
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14929
Category:                   Channels/chan_sip/TCP-TLS
Reproducibility:            have not tried
Severity:                   tweak
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 189204 
Request Review:              
====================================================================== 
Date Submitted:             2009-04-18 03:46 CDT
Last Modified:              2009-09-10 14:37 CDT
====================================================================== 
Summary:                    [patch] blank lines in _sip_tcp_helper_thread caused
by sip dummy packages
Description: 
hello, i tested TLS/TCP with a softphone called PhonerLite (based on oSIP)
And when i used it, the TCP buffer in _sip_tcp_helper_thread always was
filled with a blank line. Because the softphone broadcast empty SIP dummy
packages as NAT opener.

This was very annoying, because the dummy SIP package contents only a
single "\r\n", with the effect, that a real SIP messages was getting this
extra blank line from the dummy package because it was still in the buffer,
and so the parse_request and get_header function was not capable to work
proper. I my case this was the reason the return value for the
Content-Length was always 0 and
no sdp was read.

attached is a patch for this issue, but i am not sure if this should go
into chan_sip because it is a fix for crappy SIP dummy packages send by
other. But it is good to know what could go wrong in the
_sip_tcp_helper_thread function and have a possible solution.
====================================================================== 

---------------------------------------------------------------------- 
 (0110507) oej (manager) - 2009-09-10 14:37
 https://issues.asterisk.org/view.php?id=14929#c110507 
---------------------------------------------------------------------- 
This is very common behaviour, but I haven't seen it on TCP as there are
other ways to keep the TCP session alive. I think we should be prepared to
handle this. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-10 14:37 oej            Note Added: 0110507                          
======================================================================




More information about the asterisk-bugs mailing list