[SR-Users] interconnect 2 Kamailio server

Daniel Tryba d.tryba at pocos.nl
Tue Jun 30 12:26:57 CEST 2015


On Tuesday 30 June 2015 09:15:01 kai.ohnacker at cbc.de wrote:
> thank you for the answer. I'm a beginner with Kamailio and it is not easy to
> understand the syntax from routing algorithm. I try to write a routing
> algorithm, but I'm not very fine with this. And also my search via google
> gives no good example. Perhaps you have a link for me to find a good
> solution? Or someone else? 

The initial confusion about the inner workings of Kamailio are common, it 
didn't make any sense to me before I followed the advanced training.
Still not always doesn't post training though ;)

> For the first answer of you, you gave me the
> following example to interconnect 2 kamailio server. if($si!=ipofprivate)
> {
>  $rd="domainofprivate";
> }
> At what point that needs to be inserted into the config file?

These kinds of decision can be made in the request_route before relaying. 
Taking the basic config as starting point:
https://github.com/kamailio/kamailio/blob/master/etc/kamailio-basic.cfg

If you change the request domain ($rd) before routing to SIPOUT (line 360), 
you can forward the incoming request not coming from the private kamailio 
always go to the private kamailio since the domain will not match any of the 
local domains:
http://www.kamailio.org/wiki/cookbooks/4.2.x/core#myself





More information about the sr-users mailing list