Summary:ASTERISK-04380: Asterisks sends responses to the incorrect port
Reporter:Christian Cayeux (chris67)Labels:
Date Opened:2005-06-09 04:38:56Date Closed:2008-01-15 15:38:49.000-0600
Versions:Frequency of
Environment:Attachments:( 0) trace.txt
( 1) tracehead.txt
Description:When receiving a SIP request, I've observed that asterisk SIP channel
returns responses to the address it was received from. For exemple, if a SIP
UA, name it A, sends an Invite from a port UDP:7777 to asterisk port
UDP:5060, then Asterisk replies a 100 Trying to A:7777! On so on for each
response. There's no rport in invite. As a consequence, responses are ignored.
This behavior is not compliant to RFC3261 : see section 18.2.2. It says that when UDP is used and unless specified in Via, the response must be sent to UDP:5060.
Asterisk conforms to RFC3581 but as it is an optional extension, it should default to RFC3261. In my sip.conf, I've tried nat=never. I doesn't change anything.
Comments:By: Michael Jerris (mikej) 2005-06-09 06:39:44

Per the bug guidelines, we need to know if this is an issue in CVS head as well.

By: Christian Cayeux (chris67) 2005-06-09 07:16:34

I've retrieved the tarball for stable 1.0.7.
I don't know if issue is also in CVS head branch : i'm not able to retrieve anything through cvs because of proxy/fw policy... I have to understand cvs better to find a way to retrieve things.

By: Michael Jerris (mikej) 2005-06-09 08:07:56

e-mail me at mjerris at ofllc dot com and I will get you a head tarball.

By: Christian Cayeux (chris67) 2005-06-09 09:01:45

I cannot reach the address you gave. See below.
Can you send me the tarball at Christian.Cayeux@alcatel.fr? Thanks.

The original message was received at Thu, 9 Jun 2005 15:58:26 +0200
  ----- The following addresses had permanent fatal errors -----
   (reason: 550 Host unknown)

  ----- Transcript of session follows -----
550 5.1.2 <mjerris@offllc.com>... Host unknown (Name server: offllc.com: host not found)

By: Michael Jerris (mikej) 2005-06-10 08:10:43

e-mailed head tarball

By: Christian Cayeux (chris67) 2005-06-13 02:40:03

I've tested the CVS head : same result. It defaults to rfc3581, sending responses back to the sending address.

By: Michael Jerris (mikej) 2005-06-13 06:21:03

oej- can you review this one please?

By: Mark Spencer (markster) 2005-06-18 14:48:10

Fixed in CVS head, just a strcmp that should have been strcasecmp.  The "SIP/2.0" is not case sensitive, although you must send it in upper case (Stupidity of the design of SIP, chapter 12).  But in fact, that has nothing to do with this anyway since it's in a Via.

By: Russell Bryant (russell) 2005-06-21 10:15:34

fixed in 1.0 as well

By: Digium Subversion (svnbot) 2008-01-15 15:38:49.000-0600

Repository: asterisk
Revision: 5954

U   branches/v1-0/channels/chan_sip.c

r5954 | russell | 2008-01-15 15:38:49 -0600 (Tue, 15 Jan 2008) | 2 lines

fix via comparison to not be case sensitive (bug ASTERISK-4380)