<div dir="ltr">Use the external_media_address and external_signalling_address in PJSIP in general section.<div><br></div><div>These variables will explicitly put the required IP in SIP messages, so that other SIP phone/VoIP server know where to reply.</div><div><br></div><div> <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Thanks & Regards <div>Manikanta</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 30, 2018 at 10:08 AM KoltogyanU2 SergeyU2 <<a href="mailto:u2@amintegrator.com">u2@amintegrator.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div 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 =<a href="http://ast.firma.org" target="_blank">ast.firma.org</a>  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 <a href="http://sip.pstnhub.microsoft.com" target="_blank">sip.pstnhub.microsoft.com</a> in this form:<br>
</div>
<div><--- Transmitting SIP request (806 bytes) to TLS:<a href="http://52.114.75.24:5061" target="_blank">52.114.75.24:5061</a> ---><br>
</div>
<div>INVITE <a href="http://sip:+380770081@sip.pstnhub.microsoft.com:5061" target="_blank">sip:+380770081@sip.pstnhub.microsoft.com:5061</a> 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: <<a href="mailto:sip%3A6001@ast.firma.org" target="_blank">sip:6001@ast.firma.org</a>>;tag=9912223a-ff74-4ba6-8a0f-c3225e70eaba<br>
</div>
<div>To: <<a href="mailto:sip%3A%2B380770081@sip.pstnhub.microsoft.com" target="_blank">sip:+380770081@sip.pstnhub.microsoft.com</a>><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 =<a href="http://ast.firma.org" target="_blank">ast.firma.org</a>  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>
</div>

-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Astricon is coming up October 9-11!  Signup is available at: <a href="https://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">https://www.asterisk.org/community/astricon-user-conference</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div>