Hello, My pbx has a dynamic ip address and i am using the name myhost.dyndns.org for it. Until now i have had the following settings: vars.xml <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:myhost.dyndns.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:myhost.dyndns.org"/> Internal profile <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> <param name="ext-sip-ip" value="$${external_sip_ip}"/> However, with this I was getting a public ip in the contact header of the calls. So i had to change the internal profile to <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/> Unfortunately with the above change the system is unable to resolve the dns address and sofia status profile internal' shows Ext-SIP-IP host:myhost.dyndns.org The calls fail randomly because of this. How can i use autonat with the dynamic ip address? Thanks Rajil PS: If i use the dynamic ip address in the the conf file, there is no problem. (<X-PRE-PROCESS cmd="set" data="external_sip_ip=aa.bb.cc.dd"/>)
Capture dns traffic and analyze. Probable some resolv is wrong or fail. On Wed, Dec 30, 2015, 10:13 Rajil Saraswat <rajil.s@gmail.com> wrote:
Hello,
My pbx has a dynamic ip address and i am using the name myhost.dyndns.org for it. Until now i have had the following settings:
vars.xml <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:myhost.dyndns.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:myhost.dyndns.org"/>
Internal profile <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> <param name="ext-sip-ip" value="$${external_sip_ip}"/>
However, with this I was getting a public ip in the contact header of the calls. So i had to change the internal profile to <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/>
Unfortunately with the above change the system is unable to resolve the dns address and sofia status profile internal' shows
Ext-SIP-IP host:myhost.dyndns.org
The calls fail randomly because of this. How can i use autonat with the dynamic ip address?
Thanks Rajil
PS: If i use the dynamic ip address in the the conf file, there is no problem. (<X-PRE-PROCESS cmd="set" data="external_sip_ip=aa.bb.cc.dd"/>)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Stale DNS records will be an issue here, if your dynamic IP changes with each new lease. Then you have devices trying to connect on the old address, not having yet updated, or missing the most recent record refresh. This will cause random call drops. Another thing to consider, is this a free DNS service? If so, I wouldn't count on infinite resources being available to server lookup requests.... On 30/12/2015 5:24 PM, Sergey Safarov wrote:
Capture dns traffic and analyze. Probable some resolv is wrong or fail.
On Wed, Dec 30, 2015, 10:13 Rajil Saraswat <rajil.s@gmail.com <mailto:rajil.s@gmail.com>> wrote:
Hello,
My pbx has a dynamic ip address and i am using the name myhost.dyndns.org <http://myhost.dyndns.org> for it. Until now i have had the following settings:
vars.xml <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:myhost.dyndns.org <http://myhost.dyndns.org>"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:myhost.dyndns.org <http://myhost.dyndns.org>"/>
Internal profile <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> <param name="ext-sip-ip" value="$${external_sip_ip}"/>
However, with this I was getting a public ip in the contact header of the calls. So i had to change the internal profile to <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/>
Unfortunately with the above change the system is unable to resolve the dns address and sofia status profile internal' shows
Ext-SIP-IP host:myhost.dyndns.org <http://myhost.dyndns.org>
The calls fail randomly because of this. How can i use autonat with the dynamic ip address?
Thanks Rajil
PS: If i use the dynamic ip address in the the conf file, there is no problem. (<X-PRE-PROCESS cmd="set" data="external_sip_ip=aa.bb <http://aa.bb>.cc.dd"/>)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Your note in the P.S. is exactly what is recommended on the NAT Traversal page: https://freeswitch.org/confluence/display/FREESWITCH/NAT+Traversal "If FreeSWITCH sits behind NAT with dynamic DNS and stun doesn't work, you should write a script that determines your public IP address, makes the change, and calls reloadxml. This also holds true for the external profile. No special processing happens to determine the IP address before the variable gets passed to the external profile." There is also this warning: "Do not set ext-rtp-ip to a domain name instead of an IP or STUN entry; you will encounter a "SIP/2.0 500 Cannot Get IP Address for Media" error." I know very little about NAT problems, but maybe that script idea is best for a dynamic DNS situation. I know dyndns.org insists on a very few update clients that they trust; what client do you have updating your dynamic DNS entry? --- Bote FreeSWITCH Docs Janitor http://freeswitch.org/confluence
-----Original Message----- From: Rajil Saraswat Sent: Wednesday, 30 December, 2015 02:13 Subject: [Freeswitch-users] ext-sip-ip, dyndns and NAT
Hello,
My pbx has a dynamic ip address and i am using the name myhost.dyndns.org for it. Until now i have had the following settings:
vars.xml <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:myhost.dyndns.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:myhost.dyndns.org"/>
Internal profile <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> <param name="ext-sip-ip" value="$${external_sip_ip}"/>
However, with this I was getting a public ip in the contact header of the calls. So i had to change the internal profile to <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/>
Unfortunately with the above change the system is unable to resolve the dns address and sofia status profile internal' shows
Ext-SIP-IP host:myhost.dyndns.org
The calls fail randomly because of this. How can i use autonat with the dynamic ip address?
Thanks Rajil
PS: If i use the dynamic ip address in the the conf file, there is no problem. (<X-PRE-PROCESS cmd="set" data="external_sip_ip=aa.bb.cc.dd"/>)
This doesnt seem to be a dns update issue rather a FS configuration issue. By the way i have paid subscription of dyndns. I tried several combinations of the external_rtp_ip in vars.xml and autonat in the internal profile, and looked at the status of the internal profile. From the combinations that using autonat with either STUN or Host doesnt resolve the ip address. However, if i dont use autonat both Host and STUN do resolve the ip address. So it seems that FS doesnt do an ip lookup whenever autonat is used. Is there a work around for this or what set should i use from the combinations below: ---------------------------------------------------------------- Combinations i tried A. With static ip address and With autonat vars.xml <X-PRE-PROCESS cmd="set" data="external_rtp_ip=49.171.120.82"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=49.171.120.82"/> internal.xml profile <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/> #sofia status profile internal RTP-IP 192.168.10.10 Ext-RTP-IP 49.171.120.82 SIP-IP 192.168.10.10 Ext-SIP-IP 49.171.120.82 URL sip:mod_sofia@192.168.10.10:5060 BIND-URL sip:mod_sofia@192.168.10.10:5060;transport=udp,tcp TLS-URL sip:mod_sofia@192.168.10.10:5061 TLS-BIND-URL sips:mod_sofia@192.168.10.10:5061;transport=tls B. With STUN and With autonat <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/> <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/> #sofia status profile internal RTP-IP 192.168.10.10 Ext-RTP-IP stun:stun.freeswitch.org SIP-IP 192.168.10.10 Ext-SIP-IP stun:stun.freeswitch.org URL sip:mod_sofia@192.168.10.10:5060 BIND-URL sip:mod_sofia@192.168.10.10:5060;transport=udp,tcp TLS-URL sip:mod_sofia@192.168.10.10:5061 TLS-BIND-URL sips:mod_sofia@192.168.10.10:5061;transport=tls C. With STUN and Without autonat <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/> <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> <param name="ext-sip-ip" value="$${external_sip_ip}"/> #sofia status profile internal RTP-IP 192.168.10.10 Ext-RTP-IP stun:stun.freeswitch.org SIP-IP 192.168.10.10 Ext-SIP-IP 49.171.120.82 URL sip:mod_sofia@49.171.120.82:33758 BIND-URL sip:mod_sofia@49.171.120.82:33758;maddr=192.168.10.10;transport=udp,tcp TLS-URL sip:mod_sofia@49.171.120.82:5061 TLS-BIND-URL sips:mod_sofia@49.171.120.82:5061;maddr=192.168.10.10;transport=tls D. With host and With autonat <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:myhost.dyndns.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:myhost.dyndns.org"/> <param name="ext-rtp-ip" value="autonat:$${external_rtp_ip}"/> <param name="ext-sip-ip" value="autonat:$${external_sip_ip}"/> #sofia status profile internal RTP-IP 192.168.10.10 Ext-RTP-IP host:myhost.dyndns.org SIP-IP 192.168.10.10 Ext-SIP-IP host:myhost.dyndns.org URL sip:mod_sofia@192.168.10.10:5060 BIND-URL sip:mod_sofia@192.168.10.10:5060;transport=udp,tcp TLS-URL sip:mod_sofia@192.168.10.10:5061 TLS-BIND-URL sips:mod_sofia@192.168.10.10:5061;transport=tls E. With host and Without autonat <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:myhost.dyndns.org"/> <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:myhost.dyndns.org"/> <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> <param name="ext-sip-ip" value="$${external_sip_ip}"/> #sofia status profile internal RTP-IP 192.168.10.10 Ext-RTP-IP host:myhost.dyndns.org SIP-IP 192.168.10.10 Ext-SIP-IP 49.171.120.82 URL sip:mod_sofia@49.171.120.82:5060 BIND-URL sip:mod_sofia@49.171.120.82:5060;maddr=192.168.10.10;transport=udp,tcp TLS-URL sip:mod_sofia@49.171.120.82:5061 TLS-BIND-URL sips:mod_sofia@49.171.120.82:5061;maddr=192.168.10.10;transport=tls
participants (4)
-
Bote Man
-
Francis
-
Rajil Saraswat
-
Sergey Safarov