<div class="gmail_quote"><div>Thanks Patrick,<br><br>I have re-configured a common database for the servers and I am still having the same issues. Can this be an issue with PAT at the Load balancer after failover since the INVITE is coming from openser_2 and going to the same IP:port associated with openser_1. <br>
<br>I am also open to trying other methods to achieve OpenSER registrar HA if any available.<br><br>Thanks.<br><br>Buki A<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>---------- Forwarded message ----------<br>From: Patrick Miccio <<a href="mailto:pmiccio@upcbroadband.com">pmiccio@upcbroadband.com</a>><br>To: <<a href="mailto:users@lists.openser.org">users@lists.openser.org</a>><br>
Date: Thu, 6 Mar 2008 11:04:40 +0100<br>Subject: Re: [OpenSER-Users] issue - remote sip client must re-register after failover in Openser Registrar HA config<br>Hi,<br>
<br>
you need to have a common mysql table for the registrations so that when OpenSER_2 taks over it has the informations<br>
OpenSER_1 wrote in the DB.<br>
<br>
you can achieve this with a single mysql server, or better with a cluster ;)<br>
<br>
<br>
cheers,<br>
<br>
Patrick.<br>
<br>
<br>
> Hi friends,<br>
><br>
> I am having problems setting up seamless openser registrar failover. I am trying to setup OpenSER registrar HA using<br>
> 2 openser registrars v1.3.0 behind a Netscaler citrix Load balancer and I cant get the failover scenario to work<br>
> without re-registration of the remote sip client.<br>
><br>
> I am desperately looking for tips to make this configuration work or any other ideas to achieve SIP registrar HA<br>
> using OpenSER. Thanks.<br>
><br>
><br>
><br>
> The setup is configured as active-passive and the 2nd OpenSER becomes active only after a Openser_1 fails and the LB<br>
> fails-over to the 2nd. The 2 openser servers are SIP registrars for my voice network.<br>
><br>
> REGISTRATION:<br>
> remote SIP UA ---> remote firewall ---> internet ---> my firewall ---> citrix NA loadbalancer (VIP) ----> openSER_1<br>
> \---><br>
> openSER_2<br>
><br>
> 1. Remote SIP client configures the LB VIP as the SIP proxy and registers<br>
> 2. the citrix LB gets the registrations and forwards to the active openser (say, openser_1)<br>
> 3. openser_1 stores the contact as MIP:port in the mysql database<br>
> 4. openser_1 replicates the registration to openser_2 (t_replicate)<br>
><br>
> OUT-GOING CALL - before fail-over<br>
> remote SIP UA <--- remote firewall <--- internet <--- my firewall <--- citrix NA loadbalancer (VIP) <----> openSER_1<br>
> ^<br>
> openSER_2 |<br>
> Asterisk<br>
><br>
> 1. call (INVITE) is generated from asterisk and sent to LB VIP<br>
> 2. the citrix LB gets the INVITE and forwards to the active openser (say, openser_1)<br>
> 3. openser_1 looks-up the URI in the MySQL database, finds the MIP:port that the registration was received from the<br>
> LB and forwards the INVITE to that destination. 4. the LB receives the INVITE and forwards it to the remote SIP<br>
> client<br>
><br>
><br>
> OUT-GOING CALL - after fail-over<br>
> remote SIP UA ---x remote firewall ---x internet ---x my firewall ---x citrix NA loadbalancer (VIP) ----x openSER_1<br>
> ^<br>
> \-----< openSER_2 |<br>
> Asterisk<br>
><br>
> 1. call (INVITE) is generated from asterisk and sent to LB VIP<br>
> 2. the citrix LB gets the INVITE and forwards to the openser now active (openser_2)<br>
> 3. openser_2 looks-up the URI in the MySQL database, finds the same MIP:port of the LB that was replicated from<br>
> openser_1 and forwards the INVITE to that destination. 4. the LB receives the INVITE and drops the packet without<br>
> forwarding it out to the remote SIP client<br>
><br>
><br>
><br>
> For the outgoing call to work: the remote sip client either has to re-register, so the registration gets passed to<br>
> openser_2. OR, openser_1 is made active again.<br>
><br>
><br>
> Configuration of OpenSER:<br>
><br>
> REGISTRATION:<br>
> # If this is a registration from the public UA,<br>
> # then we store it<br>
> fix_nated_contact(); # use ip address of the packet instead of the sip message<br>
> force_rport(); # append rport. might not be necessary<br>
><br>
> # save Registration in location table<br>
> save("location");<br>
> xlog("L_DBG", "SipMsgId[$mi] Save Registration: To[$tu] Contact[$ct]\n");<br>
> append_hf("CtlRegFwd: \r\n");<br>
> # replicate the register message to the backup registrar<br>
> # if I am the backup, ignore the message<br>
> if(!t_replicate("sip:openser_2:5060")) {<br>
> xlog("L_WARN", "SipMsgId[$mi] Fail to replicate Contact[$ct] to fail over registrar\n");<br>
><br>
> OUTGOING CALL:<br>
><br>
> # Do lookup so it gets to the correct NATed destination<br>
> if (!lookup("location"))<br>
> {<br>
> # this user has not REGISTERed or registration has expired<br>
> xlog("L_INFO", "SipMsgId[$mi] Send 404-Not Found (Msg rejected because user not found)\n");<br>
> sl_send_reply("404", "Not Found");<br>
> exit;<br>
> };<br>
><br>
> # keep track of reply<br>
> t_on_reply("11");<br>
> if (!t_relay())<br>
> {<br>
> xlog("L_DBG", "SipMsgId[$mi] Failed t_relay. Do sl_reply_error.\n");<br>
> sl_reply_error();<br>
> };<br>
><br>
><br>
><br>
> Thank you for your anticipated help.<br>
><br>
> Regards,<br>
><br>
> Buki A<br>
<br>
<br></blockquote></div><br>