[asterisk-bugs] [JIRA] (ASTERISK-22236) REGISTER reply send to bad port with nat=yes(or force_rport, comedia) in 11.5.0

Filip Frank (JIRA) noreply at issues.asterisk.org
Sun Sep 1 14:05:02 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209810#comment-209810 ] 

Filip Frank commented on ASTERISK-22236:
----------------------------------------

It is a specific situation both IP phones has same IP and different port ( 2 user with same idiotic ISP - which not provide connection to internet, but only  connection to network which is connected to intenernet over NAT). Here is my debug log from 11.4.0 and 11.5.0. You can see asterisk 11.5.0 send packet out to bad port for peer iptel421, with nat=yes it must send it to source port from transport layer as 11.4.0 doing.

11.4.0 iptel12

<--- SIP read from UDP:212.158.158.178:5060 --->
REGISTER sip:pbx.lbox.cz SIP/2.0
Via: SIP/2.0/UDP 212.158.158.178:5060;branch=z9hG4bKc7e77278a4428aa199e2a8116785234a;rport
From: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>;tag=862926175
To: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>
Call-ID: 1850399984 at 192_168_88_81
CSeq: 24832 REGISTER
Contact: <sip:iptel412 at 212.158.158.178:5060>
Max-Forwards: 70
User-Agent: C590 IP/42.075.00.000.000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

<------------->
--- (12 headers 0 lines) ---
Sending to 212.158.158.178:5060 (no NAT)
Sending to 212.158.158.178:5060 (no NAT)

<--- Transmitting (NAT) to 212.158.158.178:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 212.158.158.178:5060;branch=z9hG4bKc7e77278a4428aa199e2a8116785234a;received=212.158.158.178;rport=5060
From: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>;tag=862926175
To: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>;tag=as78cd9856
Call-ID: 1850399984 at 192_168_88_81
CSeq: 24832 REGISTER
Server: Asterisk PBX 11.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="34e09006"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '1850399984 at 192_168_88_81' in 32000 ms (Method: REGISTER)


11.4.0 iptel421

<--- SIP read from UDP:212.158.158.178:8546 --->
REGISTER sip:pbx.lbox.cz:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.64.37;branch=z9hG4bK9f2fc95d64FB135E
From: "Novosad" <sip:iptel421 at pbx.lbox.cz>;tag=E75DD060-4C6E02A9
To: <sip:iptel421 at pbx.lbox.cz>
CSeq: 141 REGISTER
Call-ID: 66875994-bf1b68bd-8ac5a3be at 10.0.64.37
Contact: <sip:iptel421 at 10.0.64.37>;methods="INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER"
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.3.2.0413
Accept-Language: cs-cz
Authorization: Digest username="iptel421", realm="asterisk", nonce="3d093bf2", uri="sip:pbx.lbox.cz:5060", response="3a24a041d2521445814fd55d83d182d8", algorithm=MD5
Max-Forwards: 70
Expires: 3600
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 212.158.158.178:5060 (no NAT)
Sending to 212.158.158.178:5060 (no NAT)

<--- Transmitting (NAT) to 212.158.158.178:8546 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.64.37;branch=z9hG4bK9f2fc95d64FB135E;received=212.158.158.178;rport=8546
From: "Novosad" <sip:iptel421 at pbx.lbox.cz>;tag=E75DD060-4C6E02A9
To: <sip:iptel421 at pbx.lbox.cz>;tag=as0f4941e4
Call-ID: 66875994-bf1b68bd-8ac5a3be at 10.0.64.37
CSeq: 141 REGISTER
Server: Asterisk PBX 11.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6411c7a3"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '66875994-bf1b68bd-8ac5a3be at 10.0.64.37' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:212.158.158.178:8546 --->
REGISTER sip:pbx.lbox.cz:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.64.37;branch=z9hG4bKad3c0d77749D39E8
From: "Novosad" <sip:iptel421 at pbx.lbox.cz>;tag=E75DD060-4C6E02A9
To: <sip:iptel421 at pbx.lbox.cz>
CSeq: 142 REGISTER
Call-ID: 66875994-bf1b68bd-8ac5a3be at 10.0.64.37
Contact: <sip:iptel421 at 10.0.64.37>;methods="INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER"
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.3.2.0413
Accept-Language: cs-cz
Authorization: Digest username="iptel421", realm="asterisk", nonce="6411c7a3", uri="sip:pbx.lbox.cz:5060", response="ecf7aabadf799d123228439f0465f3b2", algorithm=MD5
Max-Forwards: 70
Expires: 3600
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 212.158.158.178:8546 (NAT)
Reliably Transmitting (NAT) to 212.158.158.178:8546:
OPTIONS sip:iptel421 at 10.0.64.37 SIP/2.0
Via: SIP/2.0/UDP 62.245.111.87:5060;branch=z9hG4bK27d5da8e;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 62.245.111.87>;tag=as782ddae7
To: <sip:iptel421 at 10.0.64.37>
Contact: <sip:asterisk at 62.245.111.87:5060>
Call-ID: 1f0e8f061719fad041aef58e33829870 at 62.245.111.87:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.4.0
Date: Sun, 01 Sep 2013 18:27:28 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

<--- Transmitting (NAT) to 212.158.158.178:8546 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.64.37;branch=z9hG4bKad3c0d77749D39E8;received=212.158.158.178;rport=8546
From: "Novosad" <sip:iptel421 at pbx.lbox.cz>;tag=E75DD060-4C6E02A9
To: <sip:iptel421 at pbx.lbox.cz>;tag=as0f4941e4
Call-ID: 66875994-bf1b68bd-8ac5a3be at 10.0.64.37
CSeq: 142 REGISTER
Server: Asterisk PBX 11.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Expires: 120
Contact: <sip:iptel421 at 10.0.64.37>;expires=120
Date: Sun, 01 Sep 2013 18:27:28 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '66875994-bf1b68bd-8ac5a3be at 10.0.64.37' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:212.158.158.178:8546 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 62.245.111.87:5060;branch=z9hG4bK27d5da8e;rport
From: "asterisk" <sip:asterisk at 62.245.111.87>;tag=as782ddae7
To: "Novosad" <sip:iptel421 at 10.0.64.37>;tag=FFEC50D2-4F1A0DCB
CSeq: 102 OPTIONS
Call-ID: 1f0e8f061719fad041aef58e33829870 at 62.245.111.87:5060
Contact: <sip:iptel421 at 10.0.64.37>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
Supported: 100rel,replaces,100rel,timer,replaces,norefersub
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.3.2.0413
Accept-Language: cs-cz
Accept: application/sdp,text/plain,message/sipfrag,application/dialog-info+xml
Accept-Encoding: identity
Content-Length: 0

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

sip show peers 

iptel412/iptel412         212.158.158.178                          D   N             5060     OK (50 ms)                                   
iptel414/iptel414         (Unspecified)                            D   N             0        UNKNOWN                                      
iptel415/iptel415         188.175.145.109                          D   N             5060     OK (124 ms)                                  
iptel416/iptel416         89.29.74.170                             D   N             5060     OK (22 ms)                                   
iptel417/iptel417         78.108.152.10                            D   N             6712     OK (132 ms)                                  
iptel418/iptel418         (Unspecified)                            D   N             0        UNKNOWN                                      
iptel421/iptel421         212.158.158.178                          D   N             8546     OK (135 ms)  

this is ok booth peers are registrated








11.5.0 iptel421

<--- SIP read from UDP:212.158.158.178:8546 --->
REGISTER sip:pbx.lbox.cz:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.64.37;branch=z9hG4bKefc918eb6332583C
From: "Novosad" <sip:iptel421 at pbx.lbox.cz>;tag=C0061F7E-1F283C97
To: <sip:iptel421 at pbx.lbox.cz>
CSeq: 1 REGISTER
Call-ID: 6dbc4725-48b95be6-636722bf at 10.0.64.37
Contact: <sip:iptel421 at 10.0.64.37>;methods="INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER"
User-Agent: PolycomSoundPointIP-SPIP_331-UA/3.3.2.0413
Accept-Language: cs-cz
Max-Forwards: 70
Expires: 3600
Content-Length: 0

<------------->
--- (12 headers 0 lines) ---
Sending to 212.158.158.178:5060 (no NAT)

<--- Transmitting (no NAT) to 212.158.158.178:5060 ---> ---response to bad port
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.64.37;branch=z9hG4bKefc918eb6332583C;received=212.158.158.178
From: "Novosad" <sip:iptel421 at pbx.lbox.cz>;tag=C0061F7E-1F283C97
To: <sip:iptel421 at pbx.lbox.cz>;tag=as02ee4a65
Call-ID: 6dbc4725-48b95be6-636722bf at 10.0.64.37
CSeq: 1 REGISTER
Server: Asterisk PBX 11.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3d8ed05b"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '6dbc4725-48b95be6-636722bf at 10.0.64.37' in 32000 ms (Method: REGISTER)
       > Saved useragent "C470IP021230000000" for peer iptel515

<--- SIP read from UDP:212.158.158.178:5060 --->

1.5.0 iptel12

<--- SIP read from UDP:212.158.158.178:5060 --->
REGISTER sip:pbx.lbox.cz SIP/2.0
Via: SIP/2.0/UDP 212.158.158.178:5060;branch=z9hG4bK1e60c383f2ebcb90d2b240098fb491;rport
From: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>;tag=862926175
To: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>
Call-ID: 1850399984 at 192_168_88_81
CSeq: 24833 REGISTER
Contact: <sip:iptel412 at 212.158.158.178:5060>
Authorization: Digest username="iptel412", realm="asterisk", algorithm=MD5, uri="sip:pbx.lbox.cz", nonce="34e09006", response="9a99fb1cab39d278bf28eea00a04984a"
Max-Forwards: 70
User-Agent: C590 IP/42.075.00.000.000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 212.158.158.178:5060 (NAT)
Reliably Transmitting (NAT) to 212.158.158.178:5060:
OPTIONS sip:iptel412 at 212.158.158.178:5060 SIP/2.0
Via: SIP/2.0/UDP 62.245.111.87:5060;branch=z9hG4bK1492e84f;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 62.245.111.87>;tag=as0d0e2919
To: <sip:iptel412 at 212.158.158.178:5060>
Contact: <sip:asterisk at 62.245.111.87:5060>
Call-ID: 5f11392404ec63ad2eb7240c1dcc98ba at 62.245.111.87:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.4.0
Date: Sun, 01 Sep 2013 18:27:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

<--- Transmitting (NAT) to 212.158.158.178:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 212.158.158.178:5060;branch=z9hG4bK1e60c383f2ebcb90d2b240098fb491;received=212.158.158.178;rport=5060
From: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>;tag=862926175
To: "Lampartovi" <sip:iptel412 at pbx.lbox.cz>;tag=as78cd9856
Call-ID: 1850399984 at 192_168_88_81
CSeq: 24833 REGISTER
Server: Asterisk PBX 11.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Expires: 120
Contact: <sip:iptel412 at 212.158.158.178:5060>;expires=120
Date: Sun, 01 Sep 2013 18:27:01 GMT
Content-Length: 0


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




11.5.0 sip show peers
iptel412/iptel412         212.158.158.178                          D   N             5060     OK (42 ms)                                   
iptel414/iptel414         (Unspecified)                            D   N             0        UNKNOWN                                      
iptel415/iptel415         188.175.145.109                          D   N             5060     OK (116 ms)                                  
iptel416/iptel416         89.29.74.170                             D   N             5060     OK (22 ms)                                   
iptel417/iptel417         78.108.152.10                            D   N             6712     OK (122 ms)                                  
iptel418/iptel418         (Unspecified)                            D   N             0        UNKNOWN                                      
iptel421/iptel421         (Unspecified)                            D   N             0        UNKNOWN                                      
iptel422/iptel422         (Unspecified)                            D                 0        UNKNOWN                                      
iptel423/iptel423         (Unspecified)                            D   N             0        UNKNOWN 

peer iptel421 is not registered and cannot call him :(

                
> REGISTER reply send to bad port with nat=yes(or force_rport,comedia) in 11.5.0
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-22236
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22236
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Registration
>    Affects Versions: 11.5.0
>            Reporter: Filip Frank
>            Assignee: Filip Frank
>            Severity: Critical
>
> I have 2 peers after NAT with same IP, one registers from source port 5060, second registers from port 1114. After upgrade to 11.5.0 only first peer is registered, asterisk send register reply both to 5060 port. I using nat=yes, i try new nat=force_rport,comedia but not helps, I think this is issue in 11.5.0, after downgrade back to 11.4.0 its ok. In 11.4.0 both peers are correctly registered and Asterisk send reply first peer to destination port 5060, second peer to 1114.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list