[asterisk-bugs] [Asterisk 0013008]: [patch] chan_sip ignores rport and does not reply to source IP:port

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jul 8 06:55:47 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13008 
====================================================================== 
Reported By:                klaus3000
Assigned To:                bbryant
====================================================================== 
Project:                    Asterisk
Issue ID:                   13008
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.21 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             07-07-2008 08:44 CDT
Last Modified:              07-08-2008 06:55 CDT
====================================================================== 
Summary:                    [patch] chan_sip ignores rport and does not reply to
source IP:port
Description: 
Hi!

I have defined a peer in sip.conf:
[klaus]
type=peer
username=klaus
secret=password
host=dynamic
context=fromklaus

Then I register with eyebeam. Eyebeam sets the "rport" parameter in via
header which should activate symmetric signaling. Further, even if rport is
missing, the RFC 3261 mandates that replies should be sent to the source IP
of the request, not the IP in the Via header (the latter one should only be
used if the first one fails (e.g. ICMP error)).

Bug: Asterisk sends the request back to the IP in the Via header. I know I
can change behavior by setting nat=yes, but even without this setting
Asterisk should be standard conform.

I used Asterisk 1.4.21.1
====================================================================== 

---------------------------------------------------------------------- 
 klaus3000 - 07-08-08 06:55  
---------------------------------------------------------------------- 
Trace + config:

<--- SIP read from 83.136.33.3:10622 --->
REGISTER sip:81.16.157.161 SIP/2.0
Via: SIP/2.0/UDP
10.10.0.51:10622;branch=z9hG4bK-d8754z-a6180f2e6c50f958-1---d8754z-;rport
Max-Forwards: 70
Contact:
<sip:klaus at 83.136.33.3:10622;rinstance=a6b3da612a4bcbb0;transport=udp>
To: <sip:klaus at 81.16.157.161>
From: <sip:klaus at 81.16.157.161>;tag=2b240f47
Call-ID: ZTJlN2Y5OTljMzQwZmRmN2M4OWMyY2RjYWE1ZTc4NjM.
CSeq: 1 REGISTER
Expires: 72000
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
User-Agent: eyeBeam release 1100z stamp 47739
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
Using latest REGISTER request as basis request
Sending to 83.136.33.3 : 10622 (NAT)

<--- Transmitting (no NAT) to 10.10.0.51:10622 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
10.10.0.51:10622;branch=z9hG4bK-d8754z-a6180f2e6c50f958-1---d8754z-;received=83.136.33.3;rport=10622
From: <sip:klaus at 81.16.157.161>;tag=2b240f47
To: <sip:klaus at 81.16.157.161>
Call-ID: ZTJlN2Y5OTljMzQwZmRmN2M4OWMyY2RjYWE1ZTc4NjM.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:klaus at 81.16.157.161>
Content-Length: 0


<------------>

<--- Transmitting (no NAT) to 10.10.0.51:10622 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
10.10.0.51:10622;branch=z9hG4bK-d8754z-a6180f2e6c50f958-1---d8754z-;received=83.136.33.3;rport=10622
From: <sip:klaus at 81.16.157.161>;tag=2b240f47
To: <sip:klaus at 81.16.157.161>;tag=as0de19ba4
Call-ID: ZTJlN2Y5OTljMzQwZmRmN2M4OWMyY2RjYWE1ZTc4NjM.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="2fb40a83"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog
'ZTJlN2Y5OTljMzQwZmRmN2M4OWMyY2RjYWE1ZTc4NjM.' in 32000 ms (Method:
REGISTER)




sip show settings


Global Settings:
----------------
  SIP Port:               5060
  Bindaddress:            0.0.0.0
  Videosupport:           No
  AutoCreatePeer:         No
  Allow unknown access:   Yes
  Allow subscriptions:    Yes
  Allow overlap dialing:  No
  Promsic. redir:         No
  SIP domain support:     No
  Call to non-local dom.: Yes
  URI user is phone no:   No
  Our auth realm          asterisk
  Realm. auth:            No
  Always auth rejects:    No
  Call limit peers only:  No
  Direct RTP setup:       No
  User Agent:             Asterisk PBX
  MWI checking interval:  10 secs
  Reg. context:           (not set)
  Caller ID:              asterisk
  From: Domain:
  Record SIP history:     Off
  Call Events:            Off
  IP ToS SIP:             none
  IP ToS RTP audio:       none
  IP ToS RTP video:       none
  T38 fax pt UDPTL:       No
  RFC2833 Compensation:   No
  SIP realtime:           Disabled

Global Signalling Settings:
---------------------------
  Codecs:                 0x8000e (gsm|ulaw|alaw|h263)
  Codec Order:            none
  T1 minimum:             100
  Relax DTMF:             No
  Compact SIP headers:    No
  RTP Keepalive:          0 (Disabled)
  RTP Timeout:            0 (Disabled)
  RTP Hold Timeout:       0 (Disabled)
  MWI NOTIFY mime type:   application/simple-message-summary
  DNS SRV lookup:         Yes
  Pedantic SIP support:   No
  Reg. min duration       60 secs
  Reg. max duration:      3600 secs
  Reg. default duration:  120 secs
  Outbound reg. timeout:  20 secs
  Outbound reg. attempts: 0
  Notify ringing state:   Yes
  Notify hold state:      No
  SIP Transfer mode:      open
  Max Call Bitrate:       384 kbps
  Auto-Framing:           No

Default Settings:
-----------------
  Context:                default
  Nat:                    RFC3581
  DTMF:                   rfc2833
  Qualify:                0
  Use ClientCode:         No
  Progress inband:        Never
  Language:               (Defaults to English)
  MOH Interpret:          default
  MOH Suggest:
  Voice Mail Extension:   asterisk



I do not have any nat=... directive in sip.conf (thus default value should
be used).

btw: What is nat=never exactly? Does it only ignore rport parameter (RFC
3581) or does ot also ignores received parameter (RFC 3261)? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-08-08 06:55  klaus3000      Note Added: 0089882                          
======================================================================




More information about the asterisk-bugs mailing list