Thank you for your response. Can you tell me what value I need to put in is_in_subnet?
Is this the local network of the Kamailio server or is it the network of the down-stream
sip server?
Do you of anyone who might be willing to work with me on this configuration for a fee or
bounty?
-----Original Message-----
From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel Tryba
Sent: Friday, August 26, 2016 4:52 AM
To: sr-users(a)lists.sip-router.org
Subject: Re: [SR-Users] Kamailio - passing registration to another sip server
On Thu, Aug 25, 2016 at 01:34:30PM -0400, Mike Patterson wrote:
Thank you. I am reviewing the doc. I am new to
Kamailio so it will
take some time for me.
Good luck then :)
Here is my slightly redacted config for a setup similar to yours (which is just a
loadbalancer/proxy), which uses both contact rewriting
(invites) and Path (registers) and dispatcher to contact the backends.
It is based on the default config supplied with kamailio (so look there for REQINIT and
WITHINDLG and anything not listed here) and has NATting stuff enabled by default (for SIP,
RTP is handled elsewhere). I don't pretend to know that it works perfectly, it just
works fine for me.
request_route {
route(REQINIT);
route(NATDETECT);
route(WITHINDLG);
if (is_method("INVITE|SUBSCRIBE"))
{
record_route();
}
if(!is_in_subnet($si, "x.x.x.x/30"))
{
add_path_received("fromlb");
ds_select_dst(1, 0);
t_on_failure("RTF_DISPATCH");
}
else
{
remove_hf("Route");
loose_route();
}
route(RELAY);
}
route[NATDETECT] {
if(!is_in_subnet($si, "x.x.x.x/30"))
{
if (!is_method("REGISTER") && is_first_hop())
{
set_contact_alias();
}
}
return;
}
route[NATMANAGE] {
if(!is_in_subnet($si, "x.x.x.x/30"))
{
if (is_reply() && is_first_hop())
{
set_contact_alias();
}
}
return;
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users