[Users] Connect two OpenSER...
Steffen Witt
witt.steffen at googlemail.com
Tue Nov 7 12:03:01 CET 2006
Hello,
I have two OpenSER servers that I want to "connect" with each other:
Phone "a" <---> Server "A" <------------> Server "B" <---> Phone "b"
Phone "a" should call phone "b" without adding the domain during call
initiation and vice versa. Phone numbers from "A" starts with "5xxxx"
and from "B" with "6xxxx".
I have tried to edit openser.cfg e.g. at server "A":
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
...
# TRY TO USE AVP
#
if (uri=~"69000@") {
avp_printf("$avp(s:new_uri)","sip:69000 at IP_OF_SERVER_B;transport=udp");
avp_pushto("$ru","$avp(s:new_uri)");
t_relay();
};
# TRY TO USE FORWARD
#
# if (to_uri=~"69000@") {
# forward("udp:IP_OF_SERVER_B:5060");
# exit;
# };
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
# if you have some interdomain connections via TLS
#if(uri=~"@tls_domain1.net") {
# t_relay("tls:domain1.net");
# exit;
#} else if(uri=~"@tls_domain2.net") {
# t_relay("tls:domain2.net");
# exit;
#}
route(1);
};
...
route(1);
}
route[1] {
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
exit;
}
The call receives phone "b" but there will be no connection
established. I get immediatelly an error on server "A" side...
"Status: 500 I'm terribly sorry, server error occured (1/SL)".
Any ideas how to configure it correctly so that I can reach my phone
on the other site? What rules do I have to create? What functions to
use? Are there any examples available (besides the source files)?
Thanks for your help!
Best regards,
Steffen
More information about the sr-users
mailing list