Digital Ocean Floating IP
Hi, Digital ocean has something called a "Floating IP Address" which is a static Address that can be move from one virtual machine to another. Each virtual machine gets its own address a creation that lasts until it is destroyed. The Floating IP lets you change the VM it points to vey quickly for disaster recovery or even upgrades. I found this: https://gist.github.com/sanderkwantes/3ab81f2d3d6ee182fa237bbc3f5c1489 explaining how to use a D.O. Floating IP, and it works. It says add this to vars.xml <X-PRE-PROCESS cmd="exec-set" data="local_ip_v4=ip addr show eth0 | awk 'FNR == 5 {print $2}' | cut -d '/' -f 1"/> BUT, when I do that, the old (still valid) IP Address can no longer be used to register. Tis makes a transition through my DNS from one to other very difficult. Is there a way to allow 2 valid IP address in a single instance of FS? Thanks, Sean
You need to create 2x internal profiles, each profile binds to a single ip:port On Wed, Oct 2, 2019, 8:47 PM Sean Devoy <sdevoy@bizfocused.com> wrote:
Hi,
Digital ocean has something called a “Floating IP Address” which is a static Address that can be move from one virtual machine to another. Each virtual machine gets its own address a creation that lasts until it is destroyed. The Floating IP lets you change the VM it points to vey quickly for disaster recovery or even upgrades.
I found this: https://gist.github.com/sanderkwantes/3ab81f2d3d6ee182fa237bbc3f5c1489 explaining how to use a D.O. Floating IP, and it works. It says add this to vars.xml
<X-PRE-PROCESS cmd="exec-set" data="local_ip_v4=ip addr show eth0 | awk 'FNR == 5 {print $2}' | cut -d '/' -f 1"/>
BUT, when I do that, the old (still valid) IP Address can no longer be used to register. Tis makes a transition through my DNS from one to other very difficult.
Is there a way to allow 2 valid IP address in a single instance of FS?
Thanks,
Sean _________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://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 https://freeswitch.com
Sean -- You can enable an arbitrary number of IP:Port combinations, essentially each Sofia profile is represents a listener. However, if the IP address is not available (say the floating IP is pointing to server A whereas server B acts as a live standby), the profile will likely refuse to start, so you may need some additional automation to make it work as expected. -C
You can use the local ipv4 as the sip address for a profile, but the the external public ip as sip-ext-ip and sip-ext-rtp-ip David On Wed, 2 Oct 2019 at 21:31, Ciprian Dosoftei <ciprian.dosoftei@gmail.com> wrote:
Sean --
You can enable an arbitrary number of IP:Port combinations, essentially each Sofia profile is represents a listener.
However, if the IP address is not available (say the floating IP is pointing to server A whereas server B acts as a live standby), the profile will likely refuse to start, so you may need some additional automation to make it work as expected.
-C _________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://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 https://freeswitch.com
-- Regards, David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
Set up net.ipv4.ip_nonlocal_bind = 1 in /etc/sysctl.conf so FreeSWITCH can still set up a binding even if the IP address isn't on the box I've previously used OVH with the failover IP addresses. There are a few nice things you can do. Using pacemaker / corosync, you can create the floating IP as a custom resource with scripts to automatically move the IP address using API calls. Couple this with the standard IP address resource to make the IP active on one server at a time. Configure session storage in a shared database such, then use a pacemaker resource to perform a "sofia recover" loading in all active sessions from the failed server, maintaining any active calls. Kind regards, On Wed, 2 Oct 2019 at 21:34, Ciprian Dosoftei <ciprian.dosoftei@gmail.com> wrote:
Sean --
You can enable an arbitrary number of IP:Port combinations, essentially each Sofia profile is represents a listener.
However, if the IP address is not available (say the floating IP is pointing to server A whereas server B acts as a live standby), the profile will likely refuse to start, so you may need some additional automation to make it work as expected.
-C _________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://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 https://freeswitch.com
-- *Andrew Cassidy BSc (Hons) MBCS* Managing Director 0330 44 55 960 <+443304455960> andrew@cassidyweb.co.uk www.cassidyweb.co.uk
I configured another sofia profile named internal-float identical to “internal” except the ipv4 variables. Phones can register using either. Phones show registered fine. “show registration” shows the registered phones. But set presence_id and bridge return USER NOT REGISTERED. This is multi-tennant. The registered domain’s sip profile is aliased to internal, not internal_float. Can they be aliased to both or how can I bridge without knowing which profile they registered through? Sean From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> On Behalf Of Ciprian Dosoftei Sent: Wednesday, October 2, 2019 3:34 PM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Digital Ocean Floating IP Sean -- You can enable an arbitrary number of IP:Port combinations, essentially each Sofia profile is represents a listener. However, if the IP address is not available (say the floating IP is pointing to server A whereas server B acts as a live standby), the profile will likely refuse to start, so you may need some additional automation to make it work as expected. -C
participants (5)
-
Andrew Cassidy
-
Avi Marcus
-
Ciprian Dosoftei
-
David Villasmil
-
Sean Devoy