Hi Daniel,
Maybe you can share with me full config of your load-balancer? It will be
really nice if I can take a look on it. I'm very new in kamailio and for me
is very difficult to complile working config from short code snippets. :)
You mentioned that you have 2 load-balancer. Does this 2 load-balancers
share one domain-name?
I was thinking to use dispatcher module for load balancing. Do you use
dispatcher module in your config?
With kind regards,
Jurijs
2015-07-21 12:25 GMT+03:00 Daniel Tryba <d.tryba(a)pocos.nl>nl>:
On Tuesday 21 July 2015 11:13:15 Jurijs Ivolga wrote:
My set-up is working as it is with default
settings, when 2 servers share
same DB in case if our subscribers do not use NAT.
If subscribers are behind NAT, then in this case such set-up will not
work,
as described here:
http://kb.smartvox.co.uk/opensips/clustering-opensips-part-2/
Please check diagram under "Far-end NAT traversal on multi-homed or
clustered servers".
Adding the Path header on save() should solve this problem. The top most
path
is either the register server itself or the other one. If it is the
otherone
the INVITE should be send there. But like I said in
http://lists.sip-router.org/pipermail/sr-users/2015-April/087872.html
I hate NAT :(
I didn't look further into my routing problems but solved it with
loadbalancers.
I believe in my case solution will be only when I
will have one more
Kamailio in front of my servers and it will dispatch all request to 2
servers, in this case I will eliminate this NAT issue.
This solved my problem. Path points to loadbalancer and received in path to
the external received address/port.
UA1 registered to register1 via loadbalancer1
UA2 registered to register2 via loadbalancer2
if UA1 calls UA2, the call will go:
UA1->LB1->random register->LB2 (based on path)->UA2 (based on path)
These loadbalancers are very simple and essentially stateless.
modparam("path", "use_received", 1)
...
request_route {
route(NATDETECT);
route(WITHINDLG);
if (is_method("INVITE|SUBSCRIBE"))
{
record_route();
}
if(!is_in_subnet($si, "myvoicesubnet"))
{
add_path_received("vialoadalancers");
$rd="mydomain";
ds_select_dst(1, 0);
t_on_failure("RTF_DISPATCH");
}
else
{
add_path("fromregistrars");
remove_hf("Route");
loose_route();
}
route(RELAY);
}
--
Telefoon: 088 0100 700
Sales: sales(a)pocos.nl | Service: servicedesk(a)pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel
17097024
_______________________________________________
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