FreeSwitch Failover Question
Hi All, I have a question concerning FS failover for high availability. My SIP provider offers the ability to route to a second server if the primary is down. That is simple enough, but what about the phones? The desktop devices are not registered with the back FS server. The only idea I have so far would be to change the DNS addresses to the backup upon failure, but that can take a long time to propagate to the phones. How do other people handle this issue? Thanks, Sean
Use the DNS SRV records for the Desk phones. Phones automatically register to the back server. Look into the DNS Srv records. You can specify the priority. Use the DNS SRV for the phone registration. I use Polycom and Cisco. Aastra phones... have bug in the firmware using DNS Srv records. http://wiki.freeswitch.org/wiki/Enterprise_deployment_DNS_SRV On Wed, Jul 11, 2012 at 11:34 AM, Sean Devoy <sdevoy@bizfocused.com> wrote:
Hi All,****
** **
I have a question concerning FS failover for high availability. My SIP provider offers the ability to route to a second server if the primary is down. That is simple enough, but what about the phones? The desktop devices are not registered with the back FS server.****
** **
The only idea I have so far would be to change the DNS addresses to the backup upon failure, but that can take a long time to propagate to the phones. ****
** **
How do other people handle this issue?****
** **
Thanks,****
Sean****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Also, you can share the registration data between servers so that it know where to send incoming calls to. Might have NAT issues with that, though, if you send via a different IP. I'm not so fluent in NAT.. -Avi
I knew there was a way. Thanks Lloyd. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lloyd Aloysius Sent: Wednesday, July 11, 2012 12:28 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] FreeSwitch Failover Question Use the DNS SRV records for the Desk phones. Phones automatically register to the back server. Look into the DNS Srv records. You can specify the priority. Use the DNS SRV for the phone registration. I use Polycom and Cisco. Aastra phones... have bug in the firmware using DNS Srv records. http://wiki.freeswitch.org/wiki/Enterprise_deployment_DNS_SRV On Wed, Jul 11, 2012 at 11:34 AM, Sean Devoy <sdevoy@bizfocused.com> wrote: Hi All, I have a question concerning FS failover for high availability. My SIP provider offers the ability to route to a second server if the primary is down. That is simple enough, but what about the phones? The desktop devices are not registered with the back FS server. The only idea I have so far would be to change the DNS addresses to the backup upon failure, but that can take a long time to propagate to the phones. How do other people handle this issue? Thanks, Sean _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 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
If I am reading correctly, this does not lend itself to multi-tenant very nicely. For example, some of my users connect to fs_aa.mydomain.com and others to fs_bb.mydomain.com. Then I can reuse the extension numbers between the 2 clients. However, SRV records, like MX records, are by domain name (ie just mydomain.com). It seems to me that the SRV records for my 2 sample "domains" would evaluate down to the same name and I would lose my critical multi-tenant information. I am hoping that I am misinterpreting the usage of SRV records. If I use SRV and attempt to connect to fs_aa.mydomain.com and the SRV records sort out to sip1.mydomain.com, what does FS see as the "domain name"? If it is still fs_aa.mydomain.com, I LOVE THIS. If it is sip1.mydomain.com, it is going to be cumbersome at the least Thanks for your patients and help, Sean. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lloyd Aloysius Sent: Wednesday, July 11, 2012 12:28 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] FreeSwitch Failover Question Use the DNS SRV records for the Desk phones. Phones automatically register to the back server. Look into the DNS Srv records. You can specify the priority. Use the DNS SRV for the phone registration. I use Polycom and Cisco. Aastra phones... have bug in the firmware using DNS Srv records. http://wiki.freeswitch.org/wiki/Enterprise_deployment_DNS_SRV On Wed, Jul 11, 2012 at 11:34 AM, Sean Devoy <sdevoy@bizfocused.com> wrote: Hi All, I have a question concerning FS failover for high availability. My SIP provider offers the ability to route to a second server if the primary is down. That is simple enough, but what about the phones? The desktop devices are not registered with the back FS server. The only idea I have so far would be to change the DNS addresses to the backup upon failure, but that can take a long time to propagate to the phones. How do other people handle this issue? Thanks, Sean _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 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
On Wed, Jul 11, 2012 at 1:28 PM, Sean Devoy <sdevoy@bizfocused.com> wrote:
I am hoping that I am misinterpreting the usage of SRV records. If I use SRV and attempt to connect to fs_aa.mydomain.com and the SRV records sort out to sip1.mydomain.com, what does FS see as the “domain name”? If it is still fs_aa.mydomain.com, I LOVE THIS. If it is sip1.mydomain.com, it is going to be cumbersome at the least
Turns out, you'll love it. But, you still have issues with tracking the registration on the back-end over several servers. That takes some work still. Great? Yes. Silver bullet? No :) Gabe
I could also recommend LinuxHA product - http://www.linux-ha.org <http://www.linux-ha.org/> . It allows to share virtual IP between servers, and failover this IP in case of primary server failure. Still, there could be issues with registrations sync J
I'm currently in the process of setting up a corosync/pacemaker install to provide a virtual ip and IPVS routed mode to send the sip packets to a FS server. FS hosts have the virtual ip bound to lo:0, and a sip profile listening on the virtual ip (allows FS to receive packets from the load balancer on ingress, on egress the packets from FS are sent directly to the endpoint with the correct ip, reducing load on the load balancer. Being on lo:0 prevents FS answering ARP requests. rtp-ip is the real FS address, so rtp bypasses the load balancer reducing its load and ensures RTP goes to the correct FS host. mod_sofia uses ODBC to use a shared database, MySQL Cluster (NDB) for HA. That means inbound registrations are visible from all FS servers regardless of which host handled the REGISTER. Outbound registrations (gateways) will be trickier as each FS host will currently need to register separately. Steve on iPhone On 13 Jul 2012, at 11:04, "Sergei" <getallad@gmail.com> wrote:
I could also recommend LinuxHA product - http://www.linux-ha.org. It allows to share virtual IP between servers, and failover this IP in case of primary server failure. Still, there could be issues with registrations sync J _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
I'm using a SIP proxy acting as load balancer installed in a Cloud (high availability) in front of a pool of FS Gateways that handle media. I don't have phone registered so the SIP proxy is a FS in "bypass_media=true" and the balancer is a FS module that handles Gateway load and fail. Stephen On Fri, Jul 13, 2012 at 2:39 PM, Steven Ayre <steveayre@gmail.com> wrote:
I'm currently in the process of setting up a corosync/pacemaker install to provide a virtual ip and IPVS routed mode to send the sip packets to a FS server.
FS hosts have the virtual ip bound to lo:0, and a sip profile listening on the virtual ip (allows FS to receive packets from the load balancer on ingress, on egress the packets from FS are sent directly to the endpoint with the correct ip, reducing load on the load balancer. Being on lo:0 prevents FS answering ARP requests.
rtp-ip is the real FS address, so rtp bypasses the load balancer reducing its load and ensures RTP goes to the correct FS host.
mod_sofia uses ODBC to use a shared database, MySQL Cluster (NDB) for HA. That means inbound registrations are visible from all FS servers regardless of which host handled the REGISTER.
Outbound registrations (gateways) will be trickier as each FS host will currently need to register separately.
Steve on iPhone
On 13 Jul 2012, at 11:04, "Sergei" <getallad@gmail.com> wrote:
I could also recommend LinuxHA product - http://www.linux-ha.org. It allows to share virtual IP between servers, and failover this IP in case of primary server failure. Still, there could be issues with registrations sync J ****
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Hey Stephen - I have a question about your setup for using FS as a SIP proxy with bypass_media. I have a similar need where I dont need registration, only inbound and bound calls from/to the PSTN --- Right now I have OpenSips sitting in front of a pool of FS, but if I could have the same setup and just use another FS, this would be preferable. My FS Pool have public IPs so I have no NAT issues with RTP, its just that the SIP signaling for incoming and outgoing calls have to come from a single IP. Are you using the proxy as I described above? If so, I'm interested to hear more details on how you have things setup. Thanks! On Fri, Jul 13, 2012 at 9:26 AM, Stephen Wilde <wstephen80@gmail.com> wrote:
I'm using a SIP proxy acting as load balancer installed in a Cloud (high availability) in front of a pool of FS Gateways that handle media. I don't have phone registered so the SIP proxy is a FS in "bypass_media=true" and the balancer is a FS module that handles Gateway load and fail.
Stephen
On Fri, Jul 13, 2012 at 2:39 PM, Steven Ayre <steveayre@gmail.com> wrote:
I'm currently in the process of setting up a corosync/pacemaker install to provide a virtual ip and IPVS routed mode to send the sip packets to a FS server.
FS hosts have the virtual ip bound to lo:0, and a sip profile listening on the virtual ip (allows FS to receive packets from the load balancer on ingress, on egress the packets from FS are sent directly to the endpoint with the correct ip, reducing load on the load balancer. Being on lo:0 prevents FS answering ARP requests.
rtp-ip is the real FS address, so rtp bypasses the load balancer reducing its load and ensures RTP goes to the correct FS host.
mod_sofia uses ODBC to use a shared database, MySQL Cluster (NDB) for HA. That means inbound registrations are visible from all FS servers regardless of which host handled the REGISTER.
Outbound registrations (gateways) will be trickier as each FS host will currently need to register separately.
Steve on iPhone
On 13 Jul 2012, at 11:04, "Sergei" <getallad@gmail.com> wrote:
I could also recommend LinuxHA product - http://www.linux-ha.org. It allows to share virtual IP between servers, and failover this IP in case of primary server failure. Still, there could be issues with registrations sync J ****
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
In my setup I don't have the necessity to have one IP for inbound/outbound calls so I have 1 IP for inbound calls (the ip of FS in bypass_media) and 'n' IP for outbound calls. But I don't see any difficult to implement your configuration (the FS that handle media can send the invite to the FS in bypass_media instead of to send them directly to providers). I have all FS with public IP and also, to increment the cps, I have all FS running with '-nosql'. My frontend FS forward the calls with a dialplan like: <action application="set" data="hangup_after_bridge=true" /> <action application="mymodule" /> <action application="set" data="bypass_media=true"/> <action application="bridge" data="sofia/external/${network_addr}#${destination_number}@${server}" /> where "mymodule" write channel variable "server" based on load/fail. For the load I have a script in each FS backend that uses "dstat" to get cpu load. For the fail I have a script that uses "sipp" to ping each FS with a sip options. On Fri, Jul 13, 2012 at 5:19 PM, Matt Stockton <mstockton@harqen.com> wrote:
Hey Stephen -
I have a question about your setup for using FS as a SIP proxy with bypass_media. I have a similar need where I dont need registration, only inbound and bound calls from/to the PSTN --- Right now I have OpenSips sitting in front of a pool of FS, but if I could have the same setup and just use another FS, this would be preferable.
My FS Pool have public IPs so I have no NAT issues with RTP, its just that the SIP signaling for incoming and outgoing calls have to come from a single IP.
Are you using the proxy as I described above? If so, I'm interested to hear more details on how you have things setup.
Thanks!
On Fri, Jul 13, 2012 at 9:26 AM, Stephen Wilde <wstephen80@gmail.com>wrote:
I'm using a SIP proxy acting as load balancer installed in a Cloud (high availability) in front of a pool of FS Gateways that handle media. I don't have phone registered so the SIP proxy is a FS in "bypass_media=true" and the balancer is a FS module that handles Gateway load and fail.
Stephen
On Fri, Jul 13, 2012 at 2:39 PM, Steven Ayre <steveayre@gmail.com> wrote:
I'm currently in the process of setting up a corosync/pacemaker install to provide a virtual ip and IPVS routed mode to send the sip packets to a FS server.
FS hosts have the virtual ip bound to lo:0, and a sip profile listening on the virtual ip (allows FS to receive packets from the load balancer on ingress, on egress the packets from FS are sent directly to the endpoint with the correct ip, reducing load on the load balancer. Being on lo:0 prevents FS answering ARP requests.
rtp-ip is the real FS address, so rtp bypasses the load balancer reducing its load and ensures RTP goes to the correct FS host.
mod_sofia uses ODBC to use a shared database, MySQL Cluster (NDB) for HA. That means inbound registrations are visible from all FS servers regardless of which host handled the REGISTER.
Outbound registrations (gateways) will be trickier as each FS host will currently need to register separately.
Steve on iPhone
On 13 Jul 2012, at 11:04, "Sergei" <getallad@gmail.com> wrote:
I could also recommend LinuxHA product - http://www.linux-ha.org. It allows to share virtual IP between servers, and failover this IP in case of primary server failure. Still, there could be issues with registrations sync J ****
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
participants (8)
-
Avi Marcus
-
Gabriel Gunderson
-
Lloyd Aloysius
-
Matt Stockton
-
Sean Devoy
-
Sergei
-
Stephen Wilde
-
Steven Ayre