Hi Mark, I'm sending below code to meet your request.<br>On each server you need to put it code inside REGISTER method and replace LOCAL_IP, PAIR_IP with your real information<br>When one OpenSIPS receive a REGISTER save it in memory and database and then send it to the other pair OpenSIPS.<br>
<br>...<br># Register method<br><br> if ( !(src_ip=="PAIR_IP" && src_port==5060) ) {<br> # Register is for me<br> if (!save("location")) {<br> sl_reply_error();<br> exit;<br> } <br>
add_sock_hdr("Local-Sock");<br> force_send_socket( "LOCAL_IP");<br> t_replicate("sip:PAIR_IP:5060"); # send to the other sip server<br> } else {<br> # it's a replicated REGISTER<br>
# set the flag for retrieving sock_info from header<br> # save contact, but only in cache<br> save("location","0x01");<br> };<br><br>I hope my can undertand my explanation and code.<br><br>Cheers,<br>
<br>Gustavo<br><br><div class="gmail_quote">On Fri, Nov 28, 2008 at 12:36 AM, mark morreny <span dir="ltr"><<a href="mailto:markmorreny@gmail.com">markmorreny@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi,</div>
<div> </div>
<div>I am working on setting up a cluster of opensips server. Opensips is writing the urs_loc info in the location table of mysql. Let's say usc-a registers with opensips-A and usc-b registers with opensips-B, when usc-a calls usc-b, opensips would say that the user is not found. Both usc-a and usc-b data is in the location identified by the different opensips's ip. Does anyone know how to make the two opensips to share the registration infoation?</div>
<div> </div>
<div>Thanks,</div>
<div>Mark</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Gustavo Mistrinelli<br>