This Medium post might also be handy:
https://medium.com/@tumalevich/kamailio-registration-replication-without-dmq...
On Fri, Sep 14, 2018 at 1:57 PM Daniel Tryba d.tryba@pocos.nl wrote:
On Thu, Sep 13, 2018 at 08:19:00AM +0000, Nathanael Eneroth wrote:
UA1<--->KAM1<---->KAM2<---->UA2 int1 int1 int3 int3 int2 int2
I would like KAM1 to forward all SIP requests destined to int3 via KAM2 and vice versa. I am aware of the routing logic in 'kamailio.cfg', but i find rather excessive. Pseudo code of what i'm trying to achieve:
This is a very basic question, but I can't find any explanation/examples about how to do this. Routing calls happens on either $du https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#du_-_destinati... of $ru https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#ru_-_request_u...
You can manipulate components like the domain with $dd/$rd. Changing them and than calling t_relay() will route the calls to somewhere else. Regaring you examples: TIMTOWTDI
if (is_method("INVITE")) { if(dst_ip == int3) set_next_kamailio_server(KAM2) }
if() { $rd="ip/dnsofkam2"; route(RELAY); exit; }
Or:
if (is_method("INVITE")) { if(callee is unkown) ask_kamailio_server(KAM2) }
if(!location()) { $rd="ip/dnsofkam2"; route(RELAY); exit; }
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users