[SR-Users] T_RELAY_TO distribute local proxy to a central one

Sébastien Brice sebastien.brice at jvs.fr
Thu May 12 15:54:12 CEST 2016


Hi guys, 
i have a kamailio running on the wan (my central kamailio) and i have phones on a private network range 172.20.0.0/16 behind a NAT.
i also run another kamailio locally to collect all sip phones on my network and this one use the DB of the remote central kamailio. 
the local kamailio does t_relay_to() the ip of the central kamailio

route {
       if (uri==myself) {

                if (method=="REGISTER") {
                route(2);
                exit;
                };

route[2] {
       rewritehost("public_remote_kamailio");
       if(!t_relay_to("udp:public_remote_kamailio:5060")) {
               sl_reply_error();
       };
       exit;
}

the bad thing is once the phones get registered with non-routable ip (like in the attached picture) trying to INVITE them directly by requesting public_kamailio_ip result in non-working situation.

how should I rewrite my dst_domain when registring in a way INVITE triggers to the local kamailio.

My local kamailio runs with the listen udp:private_local_kamailio advertise udp:public_local_kamailio

I try to be explicit but my understanding is not perfect, it would be nice you could give me a hand.

I put my local kamailio.cfg attached.

thx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12-05-2016 15-03-49.png
Type: image/png
Size: 30381 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160512/a514cab7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailio.cfg
Type: application/octet-stream
Size: 11775 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160512/a514cab7/attachment.obj>


More information about the sr-users mailing list