<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 lang="en"><span>Thank.</span> <span>it has been configured:</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>$ cat /etc/asterisk/pjsip.conf | grep -i "external"<br>
</span>
<div>external_media_address=11.22.33.44<br>
</div>
<div>external_signaling_address=11.22.33.44</div>
<div><br>
</div>
<div><span lang="en"><span>As a result - in the "Contact" field of the request "INVITE" is indicated IP ddress and not FQDN:</span></span></div>
<div><span lang="en"><span></span></span>Contact: <sip:XXYYZZ@11.22.33.44:5061;transport=TLS></div>
<div><br>
</div>
<div><span lang="en"><span>It is necessary for me that instead of IP Address there was a FQDN</span></span>, example:</div>
<div>Contact: <sip:XXYYZZ@ast.firma.org:5061;transport=TLS><br>
</div>
<div><br>
</div>
<div>How i can do this ?<br>
</div>
<div><span lang="en"><span>Where in the source code to make a change?</span></span></div>
<div><br>
</div>
<div>Serg<br>
</div>
<span></span><br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> asterisk-dev <asterisk-dev-bounces@lists.digium.com> on behalf of Mani Kanta Gadde <manikanta.gadde@zemosolabs.com><br>
<b>Sent:</b> Tuesday, October 30, 2018 8:03<br>
<b>To:</b> asterisk-dev@lists.digium.com<br>
<b>Subject:</b> Re: [asterisk-dev] Asterisk 16. PJSIP. INVITE. "Contact" field and FQDN</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<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="x_gmail_signature">
<div dir="ltr">Thanks & Regards 
<div>Manikanta</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="x_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="x_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="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fast.firma.org&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=SXju69fIhpTARkNrterbLYhzdN5KeIC8lFMhILQhOFM%3D&reserved=0" originalsrc="http://ast.firma.org" shash="y0Iez1kJ3g4dmiOVIkHpiwkCYkHsWc1Kq1xpOSyqgJsxQsDB/Owz295F3kWXz7YuvIQyPWnvQdKgGdHYplcZNwyXnoBPfS5FP6C8a8vewDz78hBa6phQCPyXOfMxw4+gLAX6FXUXUp5svkkzvDq3ZgdUzsa5Uq6WKlrzYApytKI=" 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="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip.pstnhub.microsoft.com&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=T0%2FsRAuJEOFdq6tTqbOIWYTLCIXyDTF8sP9LwRj85KQ%3D&reserved=0" originalsrc="http://sip.pstnhub.microsoft.com" shash="nEvo73+wyGsvi4SmNJZW/6dBa4cWfDxnQ2Uk0qjNsVXIw+lp/mI54C29H7sE3nmO7CbrDVnsnvg5l7AAjkdMmbh1Rlf7iC22DM8X3WDlTKm3xnw04zwwMJKe53JgQo4VEN2xCfQNIO2C6rFElRrCR6TWv0z0p3mQWbsjtaDtBM0=" target="_blank">
sip.pstnhub.microsoft.com</a> in this form:<br>
</div>
<div><--- Transmitting SIP request (806 bytes) to TLS:<a href="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2F52.114.75.24%3A5061&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=k5BOHpk7%2B9a%2Fo%2BE6%2ByRQ%2FPKz3sJ6p1xPJACDiLAni4c%3D&reserved=0" originalsrc="http://52.114.75.24:5061" shash="T1xvdlwkVQiy4c7c0xPW54LP434J9NorodTgnbjCyLPVfnFv6rheZ8KJiPjmlIjIrdWElnryJ+i6JPbJNjQ08d/MhWByQYDoVhvkxF4uvAn45eAdowBKjvMU3PBoxyqXv3PbiaKT108tqBz17GewXqsan4fV+jgrl7QrJ0UwAB4=" target="_blank">52.114.75.24:5061</a>
 ---><br>
</div>
<div>INVITE <a href="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip%3A%2B380770081%40sip.pstnhub.microsoft.com%3A5061&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=kiay5u7zJuMB2rYSG5ytHwCeJZZd8g3IEARPBCrOa5E%3D&reserved=0" originalsrc="http://sip:+380770081@sip.pstnhub.microsoft.com:5061" shash="ks/pJnCTzrq1cFbsKtD8t0gAVmommkBqaDZUSAYHByuOSop/d0fDAN6R8GW0EbUZszphOPQ1rklzcgOoKPJMo5Dxg/XT2LOcOcKs9chJL4q0TABnBJHab3LImKmnBP7+fvgsasyHrXbUQnmsy13c655N5zhm4MQMUrYaUelmvOA=" 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="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fast.firma.org&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=SXju69fIhpTARkNrterbLYhzdN5KeIC8lFMhILQhOFM%3D&reserved=0" originalsrc="http://ast.firma.org" shash="y0Iez1kJ3g4dmiOVIkHpiwkCYkHsWc1Kq1xpOSyqgJsxQsDB/Owz295F3kWXz7YuvIQyPWnvQdKgGdHYplcZNwyXnoBPfS5FP6C8a8vewDz78hBa6phQCPyXOfMxw4+gLAX6FXUXUp5svkkzvDq3ZgdUzsa5Uq6WKlrzYApytKI=" 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="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.api-digital.com&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=3UhVy2X8BMu8BtWkMoBvGqZlcNOgXlj5ppDHildrx3s%3D&reserved=0" originalsrc="http://www.api-digital.com" shash="chK7jqFlwxld96/w6/Or5H1Kmh2oFBEg6FFc3e0fmrlfxQPHN5Rkbs4MRG4OICuOlX/71b1fjmRJYgzQ18b1ambKsnf1U2l4oqqvJifmJjE8wT59wib2ppnNUUF6jhxZdDf35tOAJaF8BrowkRBMnqFeq/Q1bzfM6YpZLa4yLCc=" 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://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.asterisk.org%2Fcommunity%2Fastricon-user-conference&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=zn6WU%2BiP1InpwuR1h9VMiQ84xUn%2F8ViIzgtOa1RHQw0%3D&reserved=0" originalsrc="https://www.asterisk.org/community/astricon-user-conference" shash="FAr6Da8i3gAcpaztx6J25diQAGDvzI6GopGjDHZ31DXFnuZGbQrBhjytcHQKlWo+P4CijSUkxgu0hHCPv1BcGie1Gs8VMv2/mSFX6cFuQB2gOpmWv/Ja6cDCSDi5KZpMjPjvi2nbyl7gfICab0nkZY1J4iOmXSdwRS+8EBMSBZA=" 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="https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.digium.com%2Fmailman%2Flistinfo%2Fasterisk-dev&data=02%7C01%7Cu2%40amintegrator.com%7C560fe46fc314491f9bc508d63e2d6727%7C806bcdf8cdfb4595995e80fbcae20097%7C0%7C0%7C636764762056891576&sdata=vCXE1WzASgA%2BmQZnNdAVM7J%2FQpI5Z5zYgHde2c%2FEK%2Bk%3D&reserved=0" originalsrc="http://lists.digium.com/mailman/listinfo/asterisk-dev" shash="gGgtKTUNDEE8shtdEEPQJyvgklh/xZVIuQc8Posy7X4GEBdPbR9PvBYNquPR9ck5qNyCLyuIT+WqkHAnjsgzqBKlEbOmJzLraOyKOw+7g6EKAOhd7JLqFzUuomQbWuMz0TlXDobE3rpPLaKMoS2FCkxetEaZGH0YT6O98rgMy/U=" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote>
</div>
</div>
</div>
</body>
</html>