<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span>
<div>PJSIP . How to force use FQDN in the "Contact" field ( INVITE) ?<br>
</div>
<div><br>
</div>
<div>In the INVITE the "Contact" field looks like this:<br>
</div>
<div>Contact: <sip:XXYYZZ@11.22.33.44:5061;transport=TLS><br>
</div>
<div><br>
</div>
<div>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:<br>
</div>
<div>Contact: <sip:XXYYZZ@ast.firma.org:5061;transport=TLS><br>
</div>
<div><br>
</div>
<div>?<br>
</div>
<div><br>
</div>
<div>Description of the problem:<br>
</div>
<div>Asterisk 16 (use PJSIP. asterisk build with:<br>
</div>
<div>./configure --with-pjproject-bundled -sysconfdir=/etc --libdir=/usr/lib64<br>
</div>
<div>)<br>
</div>
<div><br>
</div>
<div>Asterisk sends a INVITE to the sip.pstnhub.microsoft.com in this form:<br>
</div>
<div><--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061 ---><br>
</div>
<div>INVITE sip:+380770081@sip.pstnhub.microsoft.com:5061 SIP/2.0<br>
</div>
<div>Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2417f6c-8788-4d40-b666-3244b903d886;alias<br>
</div>
<div>From: <sip:6001@ast.firma.org>;tag=9912223a-ff74-4ba6-8a0f-c3225e70eaba<br>
</div>
<div>To: <sip:+380770081@sip.pstnhub.microsoft.com><br>
</div>
<div>Contact: <sip:XXYYZZ@11.22.33.44:5061;transport=TLS><br>
</div>
<div>Call-ID: ee581ee7-e624-41cb-a486-b06cf233c63c<br>
</div>
<div>CSeq: 19204 INVITE<br>
</div>
<div>Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER<br>
</div>
<div>Supported: 100rel, timer, replaces, norefersub<br>
</div>
<div>Session-Expires: 1800<br>
</div>
<div>Min-SE: 90<br>
</div>
<div>Max-Forwards: 70<br>
</div>
<div>User-Agent: Asterisk PBX 16.0.0<br>
</div>
<div>Content-Type: application/sdp<br>
</div>
<div>Content-Length: 92<br>
</div>
<div><br>
</div>
<div>v=0<br>
</div>
<div>o=- 233177990 233177990 IN IP4 11.22.33.44<br>
</div>
<div>s=Asterisk<br>
</div>
<div>c=IN IP4 40.127.205.7<br>
</div>
<div>t=0 0<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Where 11.22.33.44 - Asterisk public IP Address ( Asterisk over NAT ):<br>
</div>
<div>Asterisk(172.18.1.16)--->NAT(11.22.33.44)---->ISP<br>
</div>
<div><br>
</div>
<div>In the INVITE the "Contact" field looks like this:<br>
</div>
<div>Contact: <sip:XXYYZZ@11.22.33.44:5061;transport=TLS><br>
</div>
<div><br>
</div>
<div>How to reconfigure Asterisk, or where in the source code to make a change,<br>
</div>
<div>so that the "Contact" always use FQDN =ast.firma.org and looked like this:<br>
</div>
<div>Contact: <sip:XXYYZZ@ast.firma.org:5061;transport=TLS><br>
</div>
<div><br>
</div>
<div>Serg<br>
</div>
<div>?<br>
</div>
<div><br>
</div>
<span></span><br>
</div>
</body>
</html>