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@xxxxxxxxxxxxxxxxxxxxxxxxx: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@xxxxxxxxxxxxxxxx>;tag=a6c72b0c-d26b-47be-908f-4dda08120050
To: <sip:+380770081@xxxxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxx: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 )
|
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org