Summary: | ASTERISK-12326: [patch] chan_sip ignores rport and does not reply to source IP:port | ||
Reporter: | klaus3000 (klaus3000) | Labels: | |
Date Opened: | 2008-07-07 08:44:46 | Date Closed: | 2008-07-22 18:07:59 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 07072008__issue13008_viareceived_ignored_14branch.diff ( 1) 07072008__issue13008_viareceived_ignored.diff | |
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 ****** ADDITIONAL INFORMATION ****** <--- SIP read from 83.136.33.3:21068 ---> REGISTER sip:1.2.3.4 SIP/2.0 Via: SIP/2.0/UDP 10.10.0.51:21068;branch=z9hG4bK-d8754z-f560817d4a458376-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:klaus@83.136.33.3:21068;rinstance=47f35eee71261d1b;transport=udp> To: <sip:klaus@1.2.3.4> From: <sip:klaus@1.2.3.4>;tag=40553d79 Call-ID: MDMxNmYyZjExMzMzNjZhZWJlNWMxYzFhN2RiZDM1OTk. 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 : 21068 (NAT) <--- Transmitting (no NAT) to 10.10.0.51:21068 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 10.10.0.51:21068;branch=z9hG4bK-d8754z-f560817d4a458376-1---d8754z-;received=83.136.33.3;rport=21068 From: <sip:klaus@1.2.3.4>;tag=40553d79 To: <sip:klaus@1.2.3.4> Call-ID: MDMxNmYyZjExMzMzNjZhZWJlNWMxYzFhN2RiZDM1OTk. CSeq: 1 REGISTER User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: <sip:klaus@1.2.3.4> Content-Length: 0 <------------> <--- Transmitting (no NAT) to 10.10.0.51:21068 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 10.10.0.51:21068;branch=z9hG4bK-d8754z-f560817d4a458376-1---d8754z-;received=83.136.33.3;rport=21068 From: <sip:klaus@1.2.3.4>;tag=40553d79 To: <sip:klaus@1.2.3.4>;tag=as2c2651de Call-ID: MDMxNmYyZjExMzMzNjZhZWJlNWMxYzFhN2RiZDM1OTk. 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="0e8595ae" Content-Length: 0 | ||
Comments: | By: Brett Bryant (bbryant) 2008-07-07 18:56:01 klaus3000, please try this patch and see if it fixes the problem for you. By: klaus3000 (klaus3000) 2008-07-08 01:38:04 Hi! I currently only have 1.4.21 for testing and the patch does not apply. Can you make a patch for 1.4 too? By: Olle Johansson (oej) 2008-07-08 03:46:43 This is a duplicate bug report. By: Olle Johansson (oej) 2008-07-08 03:49:42 We do have rport support in 1.4, so it's strange that it doesn't work. If you have nat=never it is turned off. That needs to be fixed. Bretts patch was for svn trunk, obviously he missed that you reported against 1.4. Klaus, you know that we also need a trace from your Asterisk when you file bug reports against SIP. This time, I would like to see "sip show settings" and a transaction with verbosity and debug output. THanks. The symmetric reply to all requests is handled in another bug report. I'll add a reference too it soon. By: klaus3000 (klaus3000) 2008-07-08 06:55:46 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@83.136.33.3:10622;rinstance=a6b3da612a4bcbb0;transport=udp> To: <sip:klaus@81.16.157.161> From: <sip:klaus@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@81.16.157.161>;tag=2b240f47 To: <sip:klaus@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@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@81.16.157.161>;tag=2b240f47 To: <sip:klaus@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)? By: klaus3000 (klaus3000) 2008-07-09 06:10:20 Hi! The patch works fine for me (Asterisk 1.4). thanks klaus By: Kevin P. Fleming (kpfleming) 2008-07-22 18:07:38 This also is a duplicate of issue 8855; instead of having multiple discussions going in different directions, let's keep everything there. |