KoltogyanU2 SergeyU2
2018-10-30 04:38:13 UTC
PJSIP . How to force use FQDN in the "Contact" field ( INVITE) ?
In the INVITE the "Contact" field looks like this:
Contact: <sip:***@11.22.33.44:5061;transport=TLS>
How to reconfigure Asterisk, or where in the source code to make a change, so that the "Contact" always use FQDN =ast.firma.org and looked like this:
Contact: <sip:***@ast.firma.org:5061;transport=TLS>
?
Description of the problem:
Asterisk 16 (use PJSIP. asterisk build with:
./configure --with-pjproject-bundled -sysconfdir=/etc --libdir=/usr/lib64
)
Asterisk sends a INVITE to the sip.pstnhub.microsoft.com in this form:
<--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 --->
INVITE sip:+***@sip.pstnhub.microsoft.com:5061 SIP/2.0
Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2417f6c-8788-4d40-b666-3244b903d886;alias
From: <sip:***@ast.firma.org>;tag=9912223a-ff74-4ba6-8a0f-c3225e70eaba
To: <sip:+***@sip.pstnhub.microsoft.com>
Contact: <sip:***@11.22.33.44:5061;transport=TLS>
Call-ID: ee581ee7-e624-41cb-a486-b06cf233c63c
CSeq: 19204 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.0.0
Content-Type: application/sdp
Content-Length: 92
v=0
o=- 233177990 233177990 IN IP4 11.22.33.44
s=Asterisk
c=IN IP4 40.127.205.7
t=0 0
Where 11.22.33.44 - Asterisk public IP Address ( Asterisk over NAT ):
Asterisk(172.18.1.16)--->NAT(11.22.33.44)---->ISP
In the INVITE the "Contact" field looks like this:
Contact: <sip:***@11.22.33.44:5061;transport=TLS>
How to reconfigure Asterisk, or where in the source code to make a change,
so that the "Contact" always use FQDN =ast.firma.org and looked like this:
Contact: <sip:***@ast.firma.org:5061;transport=TLS>
Serg
?
In the INVITE the "Contact" field looks like this:
Contact: <sip:***@11.22.33.44:5061;transport=TLS>
How to reconfigure Asterisk, or where in the source code to make a change, so that the "Contact" always use FQDN =ast.firma.org and looked like this:
Contact: <sip:***@ast.firma.org:5061;transport=TLS>
?
Description of the problem:
Asterisk 16 (use PJSIP. asterisk build with:
./configure --with-pjproject-bundled -sysconfdir=/etc --libdir=/usr/lib64
)
Asterisk sends a INVITE to the sip.pstnhub.microsoft.com in this form:
<--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 --->
INVITE sip:+***@sip.pstnhub.microsoft.com:5061 SIP/2.0
Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2417f6c-8788-4d40-b666-3244b903d886;alias
From: <sip:***@ast.firma.org>;tag=9912223a-ff74-4ba6-8a0f-c3225e70eaba
To: <sip:+***@sip.pstnhub.microsoft.com>
Contact: <sip:***@11.22.33.44:5061;transport=TLS>
Call-ID: ee581ee7-e624-41cb-a486-b06cf233c63c
CSeq: 19204 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.0.0
Content-Type: application/sdp
Content-Length: 92
v=0
o=- 233177990 233177990 IN IP4 11.22.33.44
s=Asterisk
c=IN IP4 40.127.205.7
t=0 0
Where 11.22.33.44 - Asterisk public IP Address ( Asterisk over NAT ):
Asterisk(172.18.1.16)--->NAT(11.22.33.44)---->ISP
In the INVITE the "Contact" field looks like this:
Contact: <sip:***@11.22.33.44:5061;transport=TLS>
How to reconfigure Asterisk, or where in the source code to make a change,
so that the "Contact" always use FQDN =ast.firma.org and looked like this:
Contact: <sip:***@ast.firma.org:5061;transport=TLS>
Serg
?