[OpenSIPS-Users] Load balancer behind NAT

Jose Suero ms at mstn.com
Wed Jul 31 19:52:22 CEST 2013


Hello all

I'm trying to setup opensips as proxy/loadbalancer for freeswitch, 
following http://wiki.freeswitch.org/wiki/Enterprise_deployment_OpenSIPS

right now I'm able to register to opensips which sends the registration 
to freeswitch, and when I dial a number it goes to freeswitch and gets 
dialed, the problem is that the phone tries to connect to freeswitch 
server's internal IP.

If I connect to freeswitch directly everything works fine, freeswitch 
advertises correct NAT address, but not thru opensips

I'm using dispatcher for registration and LoadBalancer with this script

        if (is_method("INVITE")) {
                 if (!load_balance("1","pstn","1")) {
                         send_reply("503","Service Unavailable");
                         exit;
                 }
         }
         else if (is_method("REGISTER")) {
                 if (!ds_select_dst("1", "0")) {
                         send_reply("503","Service Unavailable");
                         exit;
                 }
         }



thanks in advance

Jose Suero





More information about the Users mailing list