Hello Tony, I didn't get why do you want to rewrite REALM and To/From header filed, you must have same REALM on both opensips. <br>I send you the way to share registration on both server. Put same 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"<div id=":13o" class="ArwC7c ckChnd">); # 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>Best,<br>
<br>Gustavo</div><br><br><div class="gmail_quote">On Mon, Feb 16, 2009 at 6:06 AM, Tony Liao <span dir="ltr"><<a href="mailto:tonyliao@yuehetone.com">tonyliao@yuehetone.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;">
hi all,<br> we have two opensips sever as proxy and register server.for handling the user registered in another proxy server,we want to do the register replication as bellow:<br> uac register in opensipsA( OSA),OSA should rewrite the uri (OSA_IP->OSB_IP),Authorization relm(OSA_IP->OSB_IP) and To/