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.
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
When one OpenSIPS receive a REGISTER save it in memory and database and then
send it to the other pair OpenSIPS.
...
# Register method
if ( !(src_ip=="PAIR_IP" && src_port==5060) ) {
# Register is for me
if (!save("location")) {
sl_reply_error();
exit;
}
add_sock_hdr("Local-Sock");
force_send_socket( "LOCAL_IP");
t_replicate("sip:PAIR_IP:5060"); # send to the other sip server
} else {
# it's a replicated REGISTER
# set the flag for retrieving sock_info from header
# save contact, but only in cache
save("location","0x01");
};
Best,
Gustavo
On Mon, Feb 16, 2009 at 6:06 AM, Tony Liao <[email protected]> wrote:
> hi all,
> 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:
> uac register in opensipsA( OSA),OSA should rewrite the uri
> (OSA_IP->OSB_IP),Authorization relm(OSA_IP->OSB_IP) and To/From header
> filed. is anyone have codes and success to excute?
> thanks.
> **
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
Gustavo Mistrinelli
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users