[asterisk-bugs] [Asterisk 0012282]: [patch] Asterisk sends SIP-over-TCP INVITE to wrong port number

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 22 17:51:11 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=12282 
====================================================================== 
Reported By:                rjain
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   12282
Category:                   Channels/chan_sip/TCP-TLS
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 110578 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-03-23 08:28 CDT
Last Modified:              2009-05-22 17:51 CDT
====================================================================== 
Summary:                    [patch] Asterisk sends SIP-over-TCP INVITE to wrong
port number
Description: 
The scenario is that a SIP UA registers with Asterisk using TCP transport.
The UA puts its IP address, port number and transport=tcp parameter in the
REGISTER's Conact: header. Asterisk stores these contact parameters
correctly in its registration table. However, when it comes to sending an
INVITE to this UA, Asterisk puts a wrong port number in the destination
port number field of the TCP header. Due to this, the UA never receives the
INVITE. The TCP port number is actually correct in the SIP payload
including the Request-URI and the To: header in the INVITE, but it's not
correct in the TCP header. 

Asterisk log file and wireshark trace are attached.
====================================================================== 

---------------------------------------------------------------------- 
 (0105345) svnbot (reporter) - 2009-05-22 17:51
 https://issues.asterisk.org/view.php?id=12282#c105345 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 196454

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c
U   branches/1.6.0/configs/sip.conf.sample

------------------------------------------------------------------------
r196454 | dvossel | 2009-05-22 17:51:10 -0500 (Fri, 22 May 2009) | 25
lines

Merged revisions 196416 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r196416 | dvossel | 2009-05-22 16:09:45 -0500 (Fri, 22 May 2009) | 19
lines
  
  SIP set outbound transport type from Registration
  
  In sip.conf the transport option allows for the configuration of what
transport types (udp, tcp, and tls) a peer will accept, but only the first
type listed was used for outbound connections.  This patch changes this. 
Now the default transport type is only used until the peer registers.  When
registration takes place the transport type is parsed out of the Contact
header.  If the Contact header's transport type is equal to one that the
peer supports, the peer's default transport type for outbound connections
is set to match the Contact header's type.  If the Contact header's
transport type is not present, then the peer's default transport type is
set to match the one the peer registered with.  When a peer unregisters or
the registration expires, the default transport type for that peer is
reset.
  
  (closes issue https://issues.asterisk.org/view.php?id=12282)
  Reported by: rjain
  Patches:
        reg_patch_1.diff uploaded by dvossel (license 671)
  Tested by: dvossel
  
  (closes issue https://issues.asterisk.org/view.php?id=14727)
  Reported by: pj
  Patches:
        reg_patch_3.diff uploaded by dvossel (license 671)
  Tested by: pj, dvossel
  
  Review: https://reviewboard.asterisk.org/r/249/
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-22 17:51 svnbot         Checkin                                      
2009-05-22 17:51 svnbot         Note Added: 0105345                          
======================================================================




More information about the asterisk-bugs mailing list