[OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

Tuomas Kaikkonen tuomas.kaikkonen at twistpair.com
Wed Mar 20 01:21:41 CET 2013


The dispatcher works now. I had forgot some iptables NAT rules from previous testing, and had to flush all my iptables NAT rules. The source IP is now correct.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Tuomas Kaikkonen
Sent: Tuesday, March 19, 2013 4:49 PM
To: OpenSIPS users mailling list; Bogdan-Andrei Iancu
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

Trying dispatcher:


mysql> select * from dispatcher;
+----+-------+---------------------------------------+-------+--------+-------+-------------+
| id | setid | destination                           | flags | weight | attrs | description |
+----+-------+---------------------------------------+-------+--------+-------+-------------+
|  1 |     1 | sip:WWW.WWW.WWW.WWW:5060;transport=udp  |     0 |      1 |       |             |
|  2 |     1 | sip:XXX.XXX.XXX.XXX:5060;transport=udp |     0 |      1 |       |             |
+----+-------+---------------------------------------+-------+--------+-------+-------------+

The WWW and XXX are IP addresses in my actual database, just scrubbing them for posting to this mailing group.

My opensips.cfg route for the dispatching opensips is this:

route{
        if ( !mf_process_maxfwd_header("10") )
        {
                send_reply("483","To Many Hops");
                exit;
        };

        if ( !ds_select_dst("1", "0") ) {
                send_reply("500","Unable to route");
                exit;
        }

        t_relay();
}


The database is shared by the three opensips servers. When I try to register my client with the SIP domain as the IP address of the dispatching OpenSIPs  server as the SIP proxy on the client, the registration request times out. I do NOT see the destination OpenSIPs servers getting the REGISTER at all.

I see in tcpdump the client's register is received, then the dispatching OpenSIPs sends it to one of the two OpenSIPs servers configured in the dispatcher table, but when it is sending them the IP packets Source IP is marked as 192.168.1.1  -- which is NOT the internal or public IP address of this system. Somehow the OpenSIPs dispatcher will overwrite the source IP with "192.168.1.1" - is there a configuration that I should have to make it use its advertised_address?





Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org> [mailto:users-bounces at lists.opensips.org]<mailto:[mailto:users-bounces at lists.opensips.org]> On Behalf Of Tuomas Kaikkonen
Sent: Tuesday, March 19, 2013 10:43 AM
To: Bogdan-Andrei Iancu; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers with each having their own rtpproxy server. The database is shared over ssh tunnel so it looks to each server as they are using a local database. The goal is to make the service scalable so that we can add more OpenSIPs hosts as the need comes. Also we want to have the system detect if a server has failed and not direct calls/registers to that server. All the servers are in a cloud system (which does not provide Multicast, only Unicast), and they will have both public IP and internal IP associated with them. The problem with the shared database is that the location table has the socket column storing the Internal IP of the OpenSIPs server who did the REGISTER of the SIP client with. I need to relay all INVITE/BYE/CANCEL requests via that server. I have no UDP load balancer to balance the SIP requests, and having the RTP Proxy proxy all audio packets is an extra burden to the design.  Our clients register with only one SIP server, there is no configuration to register with a primary and secondary SIP proxy.

What we worry about is putting one OpenSIPs server acting as a load balancer or dispatcher, is that we'd be then again dependent on one OpenSIPs server. That dispatching / load balancing OpenSIPs server should be also backed up by a fail over server. I've looked into some, mostly academic, papers on how they did their load balancing and fail over.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]<mailto:[mailto:bogdan at opensips.org]>
Sent: Tuesday, March 19, 2013 8:01 AM
To: OpenSIPS users mailling list
Cc: Tuomas Kaikkonen
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a call. You cannot use it for REGISTERs....Anyhow REGISTERs and INVITEs are as apples and onions :)...so you cannot put them in the same basket.

if you could provide more details on what you are trying to achieve, maybe I can advice you on the best balancing option (like maybe using dispatcher module)

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com

On 03/18/2013 07:56 PM, Tuomas Kaikkonen wrote:
Can the Load Balancer module be configured to balance REGISTERs as well as the INVITES so that the above mentioned setup would work? OR is the Load Balancer module just useful for balancing RTP Proxy / media server resources for INVITEs?

I'm new to the Load Balancer module of OpenSIPs. I am running OpenSIPs stable branch 1.7 - just by looking examples from the documentation it looks like INVITE load balancing is supported.

Tuomas Kaikkonen






_______________________________________________

Users mailing list

Users at lists.opensips.org<mailto:Users at lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130319/625af0fb/attachment.htm>


More information about the Users mailing list