Resolving DNS names results in default port assignment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Resolving DNS names results in default port assignment

Phil Whitener

I am seeing issues where my Linphone Desktop (tested on Linux and Windows) sends dialog responses to the wrong destination port.  It appears to happen when the host needs to be resolved; however, I also see whne public IP addresses (not RFC1918 possibly) are used that the resolver is still invoked.  See a few log snips below from working and non-working examples.  In these examples Linphone is used as an independent SIP Softphone to our Genesys Cloud PBX, Flexisip or a Linphone account is not used.  I provided the full log and linphonerc files for a couple tests “_cloud” is the public and DNS test, “_premise” is the RFC1918 test.  The only changes are the targets and I have two proxies defined in the _cloud version.  In both examples our PBX sends and receives station connections on TLS:8061.  In the cases where resolution occurs, Linphone tries to reply to TLS:5061, possibly the default port for TLS connections.

 

 

 

 

2020-04-24 08:35:29:852 MESSAGE channel [0AD98810]: received [1246] new bytes from [TLS://192.168.144.221:8061]:

INVITE sip:Linphone_1@192.168.144.204:65403;transport=tls SIP/2.0

To: "linphone_1" sip:Linphone_1@192.168.144.221

From: "Indianapolis IN" sip:+13177158299@192.168.144.221;user=phone;tag=mnfARqI

Call-ID: f40129d5-7662-4c54-ad10-8bb32c150da0

Via: SIP/2.0/TLS 192.168.144.221:8061;branch=z9hG4bK1738068318SU5JTi9pM3NpcC4t_3121117768_

CSeq: 1 INVITE

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER

Supported: norefersub, timer

Accept: application/sdp, application/dtmf-relay

Alert-Info: <http://localhost/AutoAnswer;delay=0;info=alert-autoanswer>

Subject: Contacting Station

Contact: "Indianapolis IN" sip:+13177158299@192.168.144.221:8061;transport=tls

x-inin-cnv: 9783f38a-d2a7-4b43-a59d-3e83caf71961

x-inin-session: a2abe67e-0bf4-492b-bf1e-374b317e5797

Content-Type: application/sdp

User-Agent: ININ-EDGE/1.0.0.8974

Content-Length: 362

 

v=0

o=- 2246965867 3796720530 IN IP4 192.168.144.221

s=-

c=IN IP4 192.168.144.221

t=0 0

m=audio 29562 RTP/SAVP 96 18 0 8 101 102

a=rtpmap:96 opus/48000/2

a=rtpmap:101 telephone-event/48000

a=fmtp:101 0-15

a=rtpmap:102 telephone-event/8000

a=fmtp:102 0-15

a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BBiAVQbI42vB6HO72Agrlw+Ab5J1dVduqFLz07T2

a=sendrecv

 

2020-04-24 08:35:29:860 MESSAGE channel [0AD98810] [884] bytes parsed

2020-04-24 08:35:29:861 MESSAGE channel [0AD98810] read [362] bytes of body from [192.168.144.221:8061]

2020-04-24 08:35:29:861 MESSAGE Changing [server] [INVITE] transaction [0AC16A78], from state [INIT] to [PROCEEDING]

2020-04-24 08:35:29:862 MESSAGE channel [0AD98810]: message sent to [TLS://192.168.144.221:8061], size: [330] bytes

SIP/2.0 100 Trying

Via: SIP/2.0/TLS 192.168.144.221:8061;branch=z9hG4bK1738068318SU5JTi9pM3NpcC4t_3121117768_

From: "Indianapolis IN" sip:+13177158299@192.168.144.221;user=phone;tag=mnfARqI

To: "linphone_1" sip:Linphone_1@192.168.144.221

Call-ID: f40129d5-7662-4c54-ad10-8bb32c150da0

CSeq: 1 INVITE

Content-Length: 0

 

 

(2) Non-Working: DNS Name

 

2020-04-24 08:19:01:528 MESSAGE channel [0F739538]: received [1243] new bytes from [TLS://ec2-18-213-2-87.compute-1.amazonaws.com:8061]:

INVITE sip:Linphone_1@98.222.219.34:50281;transport=tls SIP/2.0

To: "linphone_1" sip:[hidden email]

From: "Indianapolis IN" sip:+13177158299@18.213.2.87;user=phone;tag=MEEIAV0

Call-ID: de57ec2f-8a56-4873-98d6-3e57eb06bc5b

Via: SIP/2.0/TLS 18.213.2.87;branch=z9hG4bK2688100344SU5JTi9pM3NpcC4t_2619107170_

CSeq: 1 INVITE

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER

Supported: norefersub, timer

Accept: application/sdp, application/dtmf-relay

Alert-Info: <http://localhost/AutoAnswer;delay=0;info=alert-autoanswer>

Subject: Contacting Station

Contact: "Indianapolis IN" sip:+13177158299@18.213.2.87:8061;transport=tls

x-inin-cnv: 77befc94-6913-4e5f-af86-5983854541dd

x-inin-session: a7274d51-29ba-480f-8eda-01cfef7fc00d

Content-Type: application/sdp

User-Agent: ININ-EDGE/1.0.0.9010

Content-Length: 354

 

v=0

o=- 1639457241 3796719541 IN IP4 54.164.43.14

s=-

c=IN IP4 54.164.43.14

t=0 0

m=audio 18842 RTP/SAVP 96 18 0 101 102

a=rtpmap:96 opus/48000/2

a=rtpmap:101 telephone-event/48000

a=fmtp:101 0-15

a=rtpmap:102 telephone-event/8000

a=fmtp:102 0-15

a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:LURAE+BMluDMb+8LPGGK2WSw/+sKDI5aqmkNNyYw

a=sendrecv

 

2020-04-24 08:19:01:541 MESSAGE channel [0F739538] [889] bytes parsed

2020-04-24 08:19:01:541 MESSAGE channel [0F739538] read [354] bytes of body from [ec2-18-213-2-87.compute-1.amazonaws.com:8061]

2020-04-24 08:19:01:542 MESSAGE Changing [server] [INVITE] transaction [14E93A40], from state [INIT] to [PROCEEDING]

2020-04-24 08:19:01:542 MESSAGE channel [0FFB7FC8]: starting resolution of 18.213.2.87

2020-04-24 08:19:01:543 MESSAGE channel 0FFB7FC8: state RES_IN_PROGRESS

2020-04-24 08:19:01:543 MESSAGE transaction [14E93A40] channel state changed to [RES_IN_PROGRESS]

2020-04-24 08:19:01:543 MESSAGE channel 0FFB7FC8: state RES_DONE

2020-04-24 08:19:01:543 MESSAGE transaction [14E93A40] channel state changed to [RES_DONE]

2020-04-24 08:19:01:543 MESSAGE channel 0FFB7FC8: state CONNECTING

2020-04-24 08:19:01:543 MESSAGE transaction [14E93A40] channel state changed to [CONNECTING]

2020-04-24 08:19:01:543 MESSAGE Trying to connect to [TLS://18.213.2.87:5061]

 

2020-04-24 08:19:22:646 ERROR Connection failed  for fd [3964]: cause [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

]

2020-04-24 08:19:22:646 ERROR Cannot connect to [TLS://18.213.2.87:5061]

 

 

(3) Non-Working: Public IP Address

 

2020-04-24 08:46:46:330 MESSAGE channel [0A7D75B8]: starting resolution of 3.91.170.117

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state RES_IN_PROGRESS2020-04-24 08:46:46:331 MESSAGE Trying to connect to [TLS://3.91.170.117:5061]

 

 

2020-04-24 08:46:46:321 MESSAGE channel [0ABDC498]: received [1219] new bytes from [TLS://3.91.170.117:8061]:

INVITE sip:Linphone_1@98.222.219.34:65456;transport=tls SIP/2.0

To: "linphone_1" sip:Linphone_1@3.91.170.117

From: "Indianapolis IN" sip:+13177158299@3.91.170.117;user=phone;tag=VMgHwVA

Call-ID: c959fc58-0fe9-4821-9b03-e44a59d1db6b

Via: SIP/2.0/TLS 3.91.170.117;branch=z9hG4bK1512650544SU5JTi9pM3NpcC4t_1972039476_

CSeq: 1 INVITE

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER

Supported: norefersub, timer

Accept: application/sdp, application/dtmf-relay

Alert-Info: <http://localhost/AutoAnswer;delay=0;info=alert-autoanswer>

Subject: Contacting Station

Contact: "Indianapolis IN" sip:+13177158299@3.91.170.117:8061;transport=tls

x-inin-cnv: 86112228-58b4-4676-bdf8-8e699b168e09

x-inin-session: e65b48ad-b9f8-4595-8f05-9a03f9563c61

Content-Type: application/sdp

User-Agent: ININ-EDGE/1.0.0.9010

Content-Length: 354

 

v=0

o=- 2641892491 3796721206 IN IP4 3.84.228.136

s=-

c=IN IP4 3.84.228.136

t=0 0

m=audio 22610 RTP/SAVP 96 18 0 101 102

a=rtpmap:96 opus/48000/2

a=rtpmap:101 telephone-event/48000

a=fmtp:101 0-15

a=rtpmap:102 telephone-event/8000

a=fmtp:102 0-15

a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:KxpYqTZc7foGpFwal4Itn80yAvLzTl18zNGmCDWD

a=sendrecv

 

2020-04-24 08:46:46:328 MESSAGE channel [0ABDC498] [865] bytes parsed

2020-04-24 08:46:46:329 MESSAGE channel [0ABDC498] read [354] bytes of body from [3.91.170.117:8061]

2020-04-24 08:46:46:330 MESSAGE Changing [server] [INVITE] transaction [0AA137E8], from state [INIT] to [PROCEEDING]

2020-04-24 08:46:46:330 MESSAGE channel [0A7D75B8]: starting resolution of 3.91.170.117

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state RES_IN_PROGRESS

2020-04-24 08:46:46:331 MESSAGE transaction [0AA137E8] channel state changed to [RES_IN_PROGRESS]

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state RES_DONE

2020-04-24 08:46:46:331 MESSAGE transaction [0AA137E8] channel state changed to [RES_DONE]

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state CONNECTING

2020-04-24 08:46:46:331 MESSAGE transaction [0AA137E8] channel state changed to [CONNECTING]

2020-04-24 08:46:46:331 MESSAGE Trying to connect to [TLS://3.91.170.117:5061]

 

 

Phil Whitener

Solutions Architect

M 317.715.8299

[hidden email]

 


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

linphone1.log (700K) Download Attachment
linphonerc_cloud - Copy (5K) Download Attachment
linphonerc_premise (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Resolving DNS names results in default port assignment

Peio Rigaux

Hello.

Thanks for your detailed report.

I see that you have sip.linphone.org defined as a realm.

Why did you define it in the rc file (in proxy_0 and proxy_1 categories) ? Can you try without the realm please ?

I'm not an expert in SIP, but as far as I know, if the custom port is defined in the sip URI, it should be used if there is no realm defined.

A look to liblinphone/coreapi/proxy.c should help you before we document each rcfile value.

Regards


Peio Rigaux
Junior Software Engineer
Belledonne Communications, the company behind Linphone
Linphone.org

Le 24/04/2020 à 15:07, Phil Whitener a écrit :

I am seeing issues where my Linphone Desktop (tested on Linux and Windows) sends dialog responses to the wrong destination port.  It appears to happen when the host needs to be resolved; however, I also see whne public IP addresses (not RFC1918 possibly) are used that the resolver is still invoked.  See a few log snips below from working and non-working examples.  In these examples Linphone is used as an independent SIP Softphone to our Genesys Cloud PBX, Flexisip or a Linphone account is not used.  I provided the full log and linphonerc files for a couple tests “_cloud” is the public and DNS test, “_premise” is the RFC1918 test.  The only changes are the targets and I have two proxies defined in the _cloud version.  In both examples our PBX sends and receives station connections on TLS:8061.  In the cases where resolution occurs, Linphone tries to reply to TLS:5061, possibly the default port for TLS connections.

 

 

 

 

2020-04-24 08:35:29:852 MESSAGE channel [0AD98810]: received [1246] new bytes from [TLS://192.168.144.221:8061]:

INVITE [hidden email] SIP/2.0

To: "linphone_1" [hidden email]

From: "Indianapolis IN" [hidden email]

Call-ID: f40129d5-7662-4c54-ad10-8bb32c150da0

Via: SIP/2.0/TLS 192.168.144.221:8061;branch=z9hG4bK1738068318SU5JTi9pM3NpcC4t_3121117768_

CSeq: 1 INVITE

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER

Supported: norefersub, timer

Accept: application/sdp, application/dtmf-relay

Alert-Info: <http://localhost/AutoAnswer;delay=0;info=alert-autoanswer>

Subject: Contacting Station

Contact: "Indianapolis IN" [hidden email]

x-inin-cnv: 9783f38a-d2a7-4b43-a59d-3e83caf71961

x-inin-session: a2abe67e-0bf4-492b-bf1e-374b317e5797

Content-Type: application/sdp

User-Agent: ININ-EDGE/1.0.0.8974

Content-Length: 362

 

v=0

o=- 2246965867 3796720530 IN IP4 192.168.144.221

s=-

c=IN IP4 192.168.144.221

t=0 0

m=audio 29562 RTP/SAVP 96 18 0 8 101 102

a=rtpmap:96 opus/48000/2

a=rtpmap:101 telephone-event/48000

a=fmtp:101 0-15

a=rtpmap:102 telephone-event/8000

a=fmtp:102 0-15

a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BBiAVQbI42vB6HO72Agrlw+Ab5J1dVduqFLz07T2

a=sendrecv

 

2020-04-24 08:35:29:860 MESSAGE channel [0AD98810] [884] bytes parsed

2020-04-24 08:35:29:861 MESSAGE channel [0AD98810] read [362] bytes of body from [192.168.144.221:8061]

2020-04-24 08:35:29:861 MESSAGE Changing [server] [INVITE] transaction [0AC16A78], from state [INIT] to [PROCEEDING]

2020-04-24 08:35:29:862 MESSAGE channel [0AD98810]: message sent to [TLS://192.168.144.221:8061], size: [330] bytes

SIP/2.0 100 Trying

Via: SIP/2.0/TLS 192.168.144.221:8061;branch=z9hG4bK1738068318SU5JTi9pM3NpcC4t_3121117768_

From: "Indianapolis IN" [hidden email]

To: "linphone_1" [hidden email]

Call-ID: f40129d5-7662-4c54-ad10-8bb32c150da0

CSeq: 1 INVITE

Content-Length: 0

 

 

(2) Non-Working: DNS Name

 

2020-04-24 08:19:01:528 MESSAGE channel [0F739538]: received [1243] new bytes from [TLS://ec2-18-213-2-87.compute-1.amazonaws.com:8061]:

INVITE [hidden email] SIP/2.0

To: "linphone_1" [hidden email]

From: "Indianapolis IN" [hidden email]

Call-ID: de57ec2f-8a56-4873-98d6-3e57eb06bc5b

Via: SIP/2.0/TLS 18.213.2.87;branch=z9hG4bK2688100344SU5JTi9pM3NpcC4t_2619107170_

CSeq: 1 INVITE

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER

Supported: norefersub, timer

Accept: application/sdp, application/dtmf-relay

Alert-Info: <http://localhost/AutoAnswer;delay=0;info=alert-autoanswer>

Subject: Contacting Station

Contact: "Indianapolis IN" [hidden email]

x-inin-cnv: 77befc94-6913-4e5f-af86-5983854541dd

x-inin-session: a7274d51-29ba-480f-8eda-01cfef7fc00d

Content-Type: application/sdp

User-Agent: ININ-EDGE/1.0.0.9010

Content-Length: 354

 

v=0

o=- 1639457241 3796719541 IN IP4 54.164.43.14

s=-

c=IN IP4 54.164.43.14

t=0 0

m=audio 18842 RTP/SAVP 96 18 0 101 102

a=rtpmap:96 opus/48000/2

a=rtpmap:101 telephone-event/48000

a=fmtp:101 0-15

a=rtpmap:102 telephone-event/8000

a=fmtp:102 0-15

a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:LURAE+BMluDMb+8LPGGK2WSw/+sKDI5aqmkNNyYw

a=sendrecv

 

2020-04-24 08:19:01:541 MESSAGE channel [0F739538] [889] bytes parsed

2020-04-24 08:19:01:541 MESSAGE channel [0F739538] read [354] bytes of body from [ec2-18-213-2-87.compute-1.amazonaws.com:8061]

2020-04-24 08:19:01:542 MESSAGE Changing [server] [INVITE] transaction [14E93A40], from state [INIT] to [PROCEEDING]

2020-04-24 08:19:01:542 MESSAGE channel [0FFB7FC8]: starting resolution of 18.213.2.87

2020-04-24 08:19:01:543 MESSAGE channel 0FFB7FC8: state RES_IN_PROGRESS

2020-04-24 08:19:01:543 MESSAGE transaction [14E93A40] channel state changed to [RES_IN_PROGRESS]

2020-04-24 08:19:01:543 MESSAGE channel 0FFB7FC8: state RES_DONE

2020-04-24 08:19:01:543 MESSAGE transaction [14E93A40] channel state changed to [RES_DONE]

2020-04-24 08:19:01:543 MESSAGE channel 0FFB7FC8: state CONNECTING

2020-04-24 08:19:01:543 MESSAGE transaction [14E93A40] channel state changed to [CONNECTING]

2020-04-24 08:19:01:543 MESSAGE Trying to connect to [TLS://18.213.2.87:5061]

 

2020-04-24 08:19:22:646 ERROR Connection failed  for fd [3964]: cause [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

]

2020-04-24 08:19:22:646 ERROR Cannot connect to [TLS://18.213.2.87:5061]

 

 

(3) Non-Working: Public IP Address

 

2020-04-24 08:46:46:330 MESSAGE channel [0A7D75B8]: starting resolution of 3.91.170.117

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state RES_IN_PROGRESS2020-04-24 08:46:46:331 MESSAGE Trying to connect to [TLS://3.91.170.117:5061]

 

 

2020-04-24 08:46:46:321 MESSAGE channel [0ABDC498]: received [1219] new bytes from [TLS://3.91.170.117:8061]:

INVITE [hidden email] SIP/2.0

To: "linphone_1" [hidden email]

From: "Indianapolis IN" [hidden email]

Call-ID: c959fc58-0fe9-4821-9b03-e44a59d1db6b

Via: SIP/2.0/TLS 3.91.170.117;branch=z9hG4bK1512650544SU5JTi9pM3NpcC4t_1972039476_

CSeq: 1 INVITE

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER

Supported: norefersub, timer

Accept: application/sdp, application/dtmf-relay

Alert-Info: <http://localhost/AutoAnswer;delay=0;info=alert-autoanswer>

Subject: Contacting Station

Contact: "Indianapolis IN" [hidden email]

x-inin-cnv: 86112228-58b4-4676-bdf8-8e699b168e09

x-inin-session: e65b48ad-b9f8-4595-8f05-9a03f9563c61

Content-Type: application/sdp

User-Agent: ININ-EDGE/1.0.0.9010

Content-Length: 354

 

v=0

o=- 2641892491 3796721206 IN IP4 3.84.228.136

s=-

c=IN IP4 3.84.228.136

t=0 0

m=audio 22610 RTP/SAVP 96 18 0 101 102

a=rtpmap:96 opus/48000/2

a=rtpmap:101 telephone-event/48000

a=fmtp:101 0-15

a=rtpmap:102 telephone-event/8000

a=fmtp:102 0-15

a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:KxpYqTZc7foGpFwal4Itn80yAvLzTl18zNGmCDWD

a=sendrecv

 

2020-04-24 08:46:46:328 MESSAGE channel [0ABDC498] [865] bytes parsed

2020-04-24 08:46:46:329 MESSAGE channel [0ABDC498] read [354] bytes of body from [3.91.170.117:8061]

2020-04-24 08:46:46:330 MESSAGE Changing [server] [INVITE] transaction [0AA137E8], from state [INIT] to [PROCEEDING]

2020-04-24 08:46:46:330 MESSAGE channel [0A7D75B8]: starting resolution of 3.91.170.117

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state RES_IN_PROGRESS

2020-04-24 08:46:46:331 MESSAGE transaction [0AA137E8] channel state changed to [RES_IN_PROGRESS]

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state RES_DONE

2020-04-24 08:46:46:331 MESSAGE transaction [0AA137E8] channel state changed to [RES_DONE]

2020-04-24 08:46:46:331 MESSAGE channel 0A7D75B8: state CONNECTING

2020-04-24 08:46:46:331 MESSAGE transaction [0AA137E8] channel state changed to [CONNECTING]

2020-04-24 08:46:46:331 MESSAGE Trying to connect to [TLS://3.91.170.117:5061]

 

 

Phil Whitener

Solutions Architect

M 317.715.8299

[hidden email]

 


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

0x99D28356FED78143.asc (3K) Download Attachment
signature.asc (235 bytes) Download Attachment