Thank. it has been configured: $ cat /etc/asterisk/pjsip.conf | grep -i "external" external_media_address=11.22.33.44 external_signaling_address=11.22.33.44
As a result - in the "Contact" field of the request "INVITE" is indicated IP ddress and not FQDN: Contact: <sip:XXYYZZ@11.22.33.44:5061;transport=TLS> It is necessary for me that instead of IP Address there was a FQDN, example: Contact: <sip:xxy...@ast.firma.org:5061;transport=TLS> How i can do this ? Where in the source code to make a change? Serg ________________________________ From: asterisk-dev <asterisk-dev-boun...@lists.digium.com> on behalf of Mani Kanta Gadde <manikanta.ga...@zemosolabs.com> Sent: Tuesday, October 30, 2018 8:03 To: asterisk-dev@lists.digium.com Subject: Re: [asterisk-dev] Asterisk 16. PJSIP. INVITE. "Contact" field and FQDN Use the external_media_address and external_signalling_address in PJSIP in general section. These variables will explicitly put the required IP in SIP messages, so that other SIP phone/VoIP server know where to reply. Thanks & Regards Manikanta On Tue, Oct 30, 2018 at 10:08 AM KoltogyanU2 SergeyU2 <u...@amintegrator.com<mailto:u...@amintegrator.com>> wrote: PJSIP . How to force use FQDN in the "Contact" field ( INVITE) ? In the INVITE the "Contact" field looks like this: Contact: <sip:XXYYZZ@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<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> and looked like this: Contact: <sip:xxy...@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<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> in this form: <--- Transmitting SIP request (806 bytes) to TLS:52.114.75.24:5061<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> ---> INVITE sip:+380770...@sip.pstnhub.microsoft.com:5061<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> SIP/2.0 Via: SIP/2.0/TLS 11.22.33.44:5061;rport;branch=z9hG4bKPjd2417f6c-8788-4d40-b666-3244b903d886;alias From: <sip:6...@ast.firma.org<mailto:sip%3a6...@ast.firma.org>>;tag=9912223a-ff74-4ba6-8a0f-c3225e70eaba To: <sip:+380770...@sip.pstnhub.microsoft.com<mailto:sip%3a%2b380770...@sip.pstnhub.microsoft.com>> Contact: <sip:XXYYZZ@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:XXYYZZ@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<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> and looked like this: Contact: <sip:xxy...@ast.firma.org:5061;transport=TLS> Serg ? -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com<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> -- Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference<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> asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev<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>
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Astricon is coming up October 9-11! Signup is available at: https://www.asterisk.org/community/astricon-user-conference asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev