[Freeswitch-users] High Availability and hostname used by Sofia

Henry Huang b_ball_henry at hotmail.com
Mon Oct 4 08:48:33 PDT 2010


Anthony:

But if I the FS servers do not share a floating IP but does share the
registration DB via Core ODBC. Even though the same domain is forced in the
sofia profile, the registrations will not be treated as they are on every FS
box I have correct?

The idea is to have OpenSIPS in front of FS servers to distribute
registrations. But would like to have any of the FS servers be able to
contact the registered user on the shared DB. Is it possible somehow?


Henry Huang Unified Communication System R&D, Founder of UniC Solution
US: +1 (626) 606-3306 | 台灣(Taiwan): +886 933847619
Contact Me [image:
LinkedIn]<http://www.linkedin.com/pub/henry-huang/1/654/578> [image:
Facebook] <http://www.facebook.com/profile.php?id=595148342> [image:
Twitter] <http://twitter.com/unicsolution>
IM [image: Google Talk/] red_rain_seven at gmail.com [image:
Skype/]unicsolution [image:
MSN/] b_ball_henry at hotmail.com
“"You are the embodiment of the information you choose to accept and act
upon. To change your circumstances you need to change your thinking and
subsequent actions." - Adlin
Sinclair<http://www.quotesdaddy.com/quote/6942/adlin-sinclair/you-are-the-embodiment-of-the-information-you-choose>
”  Get this email app!
<http://www.wisestamp.com/apps/quotes?utm_source=extension&utm_medium=email&utm_term=quotes&utm_campaign=apps>



On Mon, Oct 4, 2010 at 10:27 PM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:

> the registrations table intentionally does not consider the hostname
> so you can cluster many boxes on the same domain.
>
> On Mon, Oct 4, 2010 at 6:57 AM, Leon de Rooij <leon at scarlet-internet.nl>
> wrote:
> > Hello List,
> >
> > This is going to be a long mail, please bear with me :-)
> >
> > I'd like to configure High Availability for a FreeSWITCH installation
> > by using a failover server. I already discussed it a bit with Sekil on
> > IRC, but I thought it'd be useful to discuss it here as well.
> >
> >
> > The idea is as follows:
> >
> > - I have 2 servers both with an identical FreeSWITCH installation, FS1
> > and FS2.
> > - Both servers have different static IP's but also one floating IP by
> > means of heartbeat / haresources.
> > - Both FS instances have one Sofia SIP profile that use the floating IP.
> > - Both FS instances are always started (so the backup server will fail
> > to load its SIP profile because the IP is not configured - which is
> > expected behaviour)
> > - There'll be a /etc/ha.d/resource.d "resource script" that starts the
> > SIP profile (through fs_cli -x) the moment it becomes primary
> > - The resource script will also send a "sofia recover" after the SIP
> > profile has been brought up
> >
> >
> > This way:
> >
> > - There'll be one logical switch.
> > - The moment FS2 becomes primary, users will be reachable through the
> > entry in 'sip_registrations' table in the ODBC db, even though they
> > may have registered on FS1
> > - FS2 will start to send SIP options to NAT'ed useragents (keepalive /
> > udp hole punching) the moment the SIP profile is started.
> > - No client useragent involvement is necessary when failing over (like
> > re-register)
> > - Running calls will be continued because of the "sofia recover"
> >
> >
> > Only problem here is that when a useragent registers to us, then FS
> > also stores its own hostname in "sip_registrations" table in the
> > columns "hostname" and "orig_hostname" (from
> > mod_sofia_globals.hostname). This column is also used in the SELECT
> > query when bridging to a user - so that means if the user registered
> > to FS1, then a failover happens, then if a call is bridged towards
> > that user on FS2, it won't find it because it will search with FS2's
> > hostname in the SELECT query, right ?
> >
> > If everything I'm writing so far is correct, then would it be alright
> > to override the hostname in sofia.conf ? I think that would solve my
> > problem. I already looked it up - it is first set in mod_sofia.c at
> > line 4565 through gethostname(). It can be overriden in sofia.c
> > (function config_sofia) around line 2845. It would probably also work
> > to give both hosts an identical hostname in the OS, but I don't like
> > that (because of rsyslog and more).
> >
> >
> > I'm not convinced yet on how to proceed, please let me know if I'm
> > going the wrong direction. If I'm successful on getting this running,
> > I'll document everything on the wiki - also the haresources script I
> > already wrote I'll put in my contrib dir (or elsewhere in main tree if
> > preferred).
> >
> >
> > Thanks for your time,
> >
> > Leon
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
> googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:+19193869900
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101004/5aba10f7/attachment.html 


More information about the FreeSWITCH-users mailing list