On Tuesday 30 June 2015 09:15:01 kai.ohnacker(a)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