Asterisk16 PJSIP and Field "Contact:" - need FQDN.

KS
KoltogyanU2 SergeyU2
Fri, Oct 19, 2018 6:12 PM

I'm trying to connect asterisk16 and MS DIrectRouter (sip.pstnhub.microsoft.com)..
Asterisk16 build with option:
./configure --with-pjproject-bundled  -sysconfdir=/etc --libdir=/usr/lib64

Seeking how to reconfigure PJSIP, so that when sending INVITE, in the "Contact:" field did not enter the IP address, but the FQDN.

For Example.
This is now:
Asterisk16(172.18.1.16)-->NAT[11.22.33.44]-->sip.pstnhub.microsoft.com

This is a SIP INVITE Request to sip.pstnhub.microsoft.com from Asterisk16:

<--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 --->
INVITE sip:+380770081@sip.pstnhub.microsoft.com:5061 SIP/2.0
Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;alias
From: sip:6001@sbc.firma123.com;tag=a6c72b0c-d26b-47be-908f-4dda08120050
To: sip:+380770081@sip.pstnhub.microsoft.com
Contact: sip:asterisk@11.22.33.44:5061;transport=TLS

How to change  the string
Contact: sip:asterisk@11.22.33.44:5061;transport=TLS
so that it would be in this form
Contact: sip:asterisk@sbc.firma123.com:5061;transport=TLS
?

why do I need it?
This is answer from sip.pstnhub.microsoft.com:
....
VIA: SIP/2.0/TLS 11.22.33.44:5061;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;rport;alias
REASON: Q.850;cause=21;text=“88a1e69a-e890-4ce4-922a-a8a158042533;Provided Trunk FQDN ‘11.22.33.44’ is not allowed. Connection allows following fqdns: firma123.com, sbc.firma123.com.”
......
in the field of Contact there has to be FQDN…
Is it possible to make changes in the configuration file to make this happen?
Or
is it necessary to change the code in the PJSIP source code?
( You can advise where in the source code to change, so that the IP address is not entered into the "Contact" address, but a specific ONE substring sbc.firma123.com )

Serg

I'm trying to connect asterisk16 and MS DIrectRouter (sip.pstnhub.microsoft.com).. Asterisk16 build with option: ./configure --with-pjproject-bundled -sysconfdir=/etc --libdir=/usr/lib64 Seeking how to reconfigure PJSIP, so that when sending INVITE, in the "Contact:" field did not enter the IP address, but the FQDN. For Example. This is now: Asterisk16(172.18.1.16)-->NAT[11.22.33.44]-->sip.pstnhub.microsoft.com This is a SIP INVITE Request to sip.pstnhub.microsoft.com from Asterisk16: <--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 ---> INVITE sip:+380770081@sip.pstnhub.microsoft.com:5061 SIP/2.0 Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;alias From: <sip:6001@sbc.firma123.com>;tag=a6c72b0c-d26b-47be-908f-4dda08120050 To: <sip:+380770081@sip.pstnhub.microsoft.com> Contact: <sip:asterisk@11.22.33.44:5061;transport=TLS> How to change the string Contact: <sip:asterisk@11.22.33.44:5061;transport=TLS> so that it would be in this form Contact: <sip:asterisk@sbc.firma123.com:5061;transport=TLS> ? why do I need it? This is answer from sip.pstnhub.microsoft.com: .... VIA: SIP/2.0/TLS 11.22.33.44:5061;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;rport;alias REASON: Q.850;cause=21;text=“88a1e69a-e890-4ce4-922a-a8a158042533;Provided Trunk FQDN ‘11.22.33.44’ is not allowed. Connection allows following fqdns: firma123.com, sbc.firma123.com.” ...... in the field of Contact there has to be FQDN… Is it possible to make changes in the configuration file to make this happen? Or is it necessary to change the code in the PJSIP source code? ( You can advise where in the source code to change, so that the IP address is not entered into the "Contact" address, but a specific ONE substring sbc.firma123.com ) Serg
KS
KoltogyanU2 SergeyU2
Thu, Oct 25, 2018 9:14 AM

Please, help to find:
In what *.c module the line is created

Contact: sip:asterisk@11.22.33.44:5061;transport=TLS
?
I want to make change that: ALWAYS, instead of 11.22.33.44 there was a record sss.myrecord.com

Serg


From: pjsip pjsip-bounces@lists.pjsip.org on behalf of KoltogyanU2 SergeyU2 u2@amintegrator.com
Sent: Friday, October 19, 2018 21:12
To: pjsip@lists.pjsip.org
Subject: [pjsip] Asterisk16 PJSIP and Field "Contact:" - need FQDN.

I'm trying to connect asterisk16 and MS DIrectRouter (sip.pstnhub.microsoft.com)..
Asterisk16 build with option:
./configure --with-pjproject-bundled  -sysconfdir=/etc --libdir=/usr/lib64

Seeking how to reconfigure PJSIP, so that when sending INVITE, in the "Contact:" field did not enter the IP address, but the FQDN.

For Example.
This is now:
Asterisk16(172.18.1.16)-->NAT[11.22.33.44]-->sip.pstnhub.microsoft.com

This is a SIP INVITE Request to sip.pstnhub.microsoft.com from Asterisk16:

<--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 --->
INVITE sip:+380770081@sip.pstnhub.microsoft.com:5061 SIP/2.0
Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;alias
From: sip:6001@sbc.firma123.com;tag=a6c72b0c-d26b-47be-908f-4dda08120050
To: sip:+380770081@sip.pstnhub.microsoft.com
Contact: sip:asterisk@11.22.33.44:5061;transport=TLS

How to change  the string
Contact: sip:asterisk@11.22.33.44:5061;transport=TLS
so that it would be in this form
Contact: sip:asterisk@sbc.firma123.com:5061;transport=TLS
?

why do I need it?
This is answer from sip.pstnhub.microsoft.com:
....
VIA: SIP/2.0/TLS 11.22.33.44:5061;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;rport;alias
REASON: Q.850;cause=21;text=“88a1e69a-e890-4ce4-922a-a8a158042533;Provided Trunk FQDN ‘11.22.33.44’ is not allowed. Connection allows following fqdns: firma123.com, sbc.firma123.com.”
......
in the field of Contact there has to be FQDN…
Is it possible to make changes in the configuration file to make this happen?
Or
is it necessary to change the code in the PJSIP source code?
( You can advise where in the source code to change, so that the IP address is not entered into the "Contact" address, but a specific ONE substring sbc.firma123.com )

Serg

Please, help to find: In what *.c module the line is created Contact: <sip:asterisk@11.22.33.44:5061;transport=TLS> ? I want to make change that: ALWAYS, instead of 11.22.33.44 there was a record sss.myrecord.com Serg ________________________________ From: pjsip <pjsip-bounces@lists.pjsip.org> on behalf of KoltogyanU2 SergeyU2 <u2@amintegrator.com> Sent: Friday, October 19, 2018 21:12 To: pjsip@lists.pjsip.org Subject: [pjsip] Asterisk16 PJSIP and Field "Contact:" - need FQDN. I'm trying to connect asterisk16 and MS DIrectRouter (sip.pstnhub.microsoft.com).. Asterisk16 build with option: ./configure --with-pjproject-bundled -sysconfdir=/etc --libdir=/usr/lib64 Seeking how to reconfigure PJSIP, so that when sending INVITE, in the "Contact:" field did not enter the IP address, but the FQDN. For Example. This is now: Asterisk16(172.18.1.16)-->NAT[11.22.33.44]-->sip.pstnhub.microsoft.com This is a SIP INVITE Request to sip.pstnhub.microsoft.com from Asterisk16: <--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 ---> INVITE sip:+380770081@sip.pstnhub.microsoft.com:5061 SIP/2.0 Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;alias From: <sip:6001@sbc.firma123.com>;tag=a6c72b0c-d26b-47be-908f-4dda08120050 To: <sip:+380770081@sip.pstnhub.microsoft.com> Contact: <sip:asterisk@11.22.33.44:5061;transport=TLS> How to change the string Contact: <sip:asterisk@11.22.33.44:5061;transport=TLS> so that it would be in this form Contact: <sip:asterisk@sbc.firma123.com:5061;transport=TLS> ? why do I need it? This is answer from sip.pstnhub.microsoft.com: .... VIA: SIP/2.0/TLS 11.22.33.44:5061;branch=z9hG4bKPjd2eab8f8-666c-4cb0-94ed-cc747dafcd8a;rport;alias REASON: Q.850;cause=21;text=“88a1e69a-e890-4ce4-922a-a8a158042533;Provided Trunk FQDN ‘11.22.33.44’ is not allowed. Connection allows following fqdns: firma123.com, sbc.firma123.com.” ...... in the field of Contact there has to be FQDN… Is it possible to make changes in the configuration file to make this happen? Or is it necessary to change the code in the PJSIP source code? ( You can advise where in the source code to change, so that the IP address is not entered into the "Contact" address, but a specific ONE substring sbc.firma123.com ) Serg