[SR-Users] Forward SIP request between two Kamailio servers
Gholamreza Sabery
gr.sabery at gmail.com
Fri Sep 14 15:28:53 CEST 2018
This Medium post might also be handy:
https://medium.com/@tumalevich/kamailio-registration-replication-without-dmq-65e225f9a8a7
On Fri, Sep 14, 2018 at 1:57 PM Daniel Tryba <d.tryba at 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_-_destination_uri
> of
> $ru
> https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#ru_-_request_uri
>
> 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 at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180914/7727cf86/attachment.html>
More information about the sr-users
mailing list