[OpenSIPS-Users] opensips 1.6.4 load balancing performance

Iulian Macare iulian.macare at gmail.com
Wed Mar 7 14:41:32 CET 2012


I think I solved the problem. It's related to the fact that I use
opensips as registrar also

For exampel I have users 300 with password 300 on opensips and also an
extension 300 with pass 300 on the asterisk servers that I balance the
calls.

The solution for me was to remove the secret for extension 300 in asterisk.

On Wed, Mar 7, 2012 at 11:40 AM, Iulian Macare <iulian.macare at gmail.com> wrote:
> I have installed Opensips 1.7.2 on debian and I have the same problem.
>
>
>
> Mar  7 10:23:59 opensipsnew /usr/sbin/opensips[18883]: sending call
> with callid 3817a6411cec76292a8d1c2811ad7def at 82.77.252.47 and ruri
> sip:0103629834 at 82.77.252.40 to sip:82.77.252.48
> Mar  7 10:23:59 opensipsnew /usr/sbin/opensips[18882]: sending call
> with callid 3817a6411cec76292a8d1c2811ad7def at 82.77.252.47 and ruri
> sip:0103629834 at 82.77.252.40 to sip:82.77.252.39
> Mar  7 10:23:59 opensipsnew /usr/sbin/opensips[18880]: sending call
> with callid 3817a6411cec76292a8d1c2811ad7def at 82.77.252.47 and ruri
> sip:0103629834 at 82.77.252.40 to sip:82.77.252.48
> Mar  7 10:23:59 opensipsnew /usr/sbin/opensips[18880]: sending call
> with callid 3817a6411cec76292a8d1c2811ad7def at 82.77.252.47 and ruri
> sip:0103629834 at 82.77.252.40 to sip:82.77.252.48
>
> The called number is 0103629834 sent both to 82.77.252.39 and
> 82.77.252.48 many times
>
> In the configuration file I have
>
>
> if (uri=~"^sip:0[1-9][0-9]*@") {
>    load_balance("1","pstn");
>    xlog("sending call with callid $ci and ruri $ru to $du\n");
>    t_on_failure("1");
>
>    if (!t_relay())
>  {  sl_reply_error();
>    };
>    exit;
>    }
>
>
> Destination:: sip:82.77.252.39 id=3 group=1 enabled=yes auto-re=on
>        Resource:: pstn max=200 load=36
> Destination:: sip:82.77.252.35 id=1 group=1 enabled=yes auto-re=on
>        Resource:: pstn max=200 load=36
> Destination:: sip:82.77.252.48 id=6 group=1 enabled=yes auto-re=on
>        Resource:: pstn max=200 load=36
>
>
>
>
> The number 0103629834 I don't see it in opensips in accounting ( I use
> CDRTool ) and I also don't see it in any logs on 82.77.252.39 or
> 82.77.252.48 ( wich are Asterisks )
>
>
> opensips 1.6.4 load balancing performance
>
> On Tue, Mar 15, 2011 at 6:46 PM, Iulian Macare <iulian.macare at gmail.com> wrote:
>> I see also something like this:
>>
>> Mar 15 18:47:36 opensipsvl /usr/local/sbin/opensips[4547]: sending call with
>> callid 3b77e3325a8c75f8571c4fcf37a8ba3c at 192.168.52.10 and ruri
>> sip:0758553307 at 192.168.52.20 to sip:192.168.254.241
>> Mar 15 18:47:36 opensipsvl /usr/local/sbin/opensips[4539]: sending call with
>> callid 3b77e3325a8c75f8571c4fcf37a8ba3c at 192.168.52.10 and ruri
>> sip:0758553307 at 192.168.52.20 to sip:192.168.254.241
>> Mar 15 18:47:36 opensipsvl /usr/local/sbin/opensips[4556]: sending call with
>> callid 3b77e3325a8c75f8571c4fcf37a8ba3c at 192.168.52.10 and ruri
>> sip:0758553307 at 192.168.52.20 to sip:192.168.254.242
>>
>> Same call 3 times.. 2 to one server and another time to the other
>>
>> On Tue, Mar 15, 2011 at 12:10 PM, Bogdan-Andrei Iancu <bogdan at opensips.org>
>> wrote:
>>>
>>> Hi Iulian,
>>>
>>>
>>>
>>> Related to the second issue (with 2 logs for a single call), I suspect it
>>> may be a retransmission issue. To be sure, print in your xlog the callid
>>> also (to be sure it is the same request) . Var for callid is $ci.
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>> Iulian Macare wrote:
>>>>
>>>> Hello
>>>>
>>>>
>>>> I have installed OpenSips 1.6.4 on CentOS 5.5 32bit with load balancing &
>>>> mysql support ; I want to balance calls to 2 asterisk servers . I am sending
>>>> traffic to opensips from 1 x  gnudialer & 1 x vicidial ( so from predictive
>>>> dialers ). Situation is like this:
>>>>
>>>>
>>>>
>>>> +----+----------+--------------------------+-----------+------------+-------------+
>>>> | id | group_id | dst_uri                  | resources | probe_mode |
>>>> description |
>>>>
>>>> +----+----------+--------------------------+-----------+------------+-------------+
>>>> |  1 |        1 | sip:192.168.254.241:5060 <http://192.168.254.241:5060>
>>>> | pstn=300  |          0 |             |
>>>> |  2 |        1 | sip:192.168.254.242:5060 <http://192.168.254.242:5060>
>>>> | pstn=300  |          0 |             |
>>>>
>>>>
>>>> +----+----------+--------------------------+-----------+------------+-------------+
>>>>
>>>> 600 channels in total , and I send around 500 channels ; OpenSips drops a
>>>> lot of calls; By drop I mean a call that is not sent to one of those 2
>>>> asterisk servers that I have.
>>>>
>>>> The code for balancing in this situation is:
>>>>
>>>> if (uri=~"^sip:0[1-9][0-9]*@") {
>>>>        load_balance("1","pstn");
>>>>    xlog("sending call $ru to $du\n");
>>>>    t_relay();
>>>>    exit;
>>>>    }
>>>>
>>>> ! An important thing to say is that in /var/log/messages I see the
>>>> specific number that is sent to 192.168.254.241 for example ; So the
>>>> parameter xlog("sending call $ru to $du\n"); works ; The problem is that in
>>>> logs on 192.168.254.241 that number never arrives in asterisk logs ; In logs
>>>> of vicidial & gnudialer I see it like congestion.
>>>>
>>>> If I do something like this:
>>>>
>>>>
>>>> +----+----------+---------------------+-----------+------------+-------------+
>>>> | id | group_id | dst_uri             | resources | probe_mode |
>>>> description |
>>>>
>>>> +----+----------+---------------------+-----------+------------+-------------+
>>>> |  1 |        1 | sip:192.168.254.241    | pstn=150   |          0 |
>>>>         |
>>>> |  2 |        2 | sip:192.168.254.241    | pstn=150   |          0 |
>>>>         |
>>>> |  3 |        1 | sip:192.168.254.242    | pstn=150   |          0 |
>>>>         |
>>>> |  4 |        2 | sip:192.168.254.242    | pstn=150   |          0 |
>>>>         |
>>>>
>>>> And I split opensips balancing in 2
>>>>
>>>>
>>>> if(src_ip==192.168.3.10 )
>>>>        {
>>>>        load_balance("1","pstn");
>>>>       xlog("sending call to $du\n");
>>>>        t_relay();
>>>>        exit;
>>>>        };
>>>>
>>>> if(src_ip==192.168.3.11 )
>>>>        {
>>>>        load_balance("2","pstn");
>>>>       xlog("sending call to $du\n");
>>>>        t_relay();
>>>>        exit;
>>>>        };
>>>>
>>>>
>>>> and by doing this I get the same numbers of channels on opensips ( around
>>>> 500 channels ) but I am splitting in 2 groups of load balancing; It can
>>>> process all the calls.
>>>>
>>>> Another question that I saw is that when I make a single call to opensips
>>>> and I involve load balancing in /var/log/messages I get 2 times the same
>>>> message .. just like it send 2 time to asterisk server the call .. but on
>>>> asterisk I receive only one time.
>>>>
>>>> Mar 10 14:58:47 opensips /usr/local/sbin/opensips[27611]: sending call to
>>>> sip:192.168.254.241
>>>> Mar 10 14:58:47 opensips /usr/local/sbin/opensips[27611]: sending call to
>>>> sip:192.168.254.241
>>>>
>>>>
>>>> Isn't load balancing fast enough the process the calls made by predictive
>>>> dialers, when over 300 channels is sent .. ?  Or I have some mistakes made .
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>
>>>
>>>
>>> --
>>> Bogdan-Andrei Iancu
>>> OpenSIPS eBootcamp - 28th February 2011
>>> OpenSIPS solutions and "know-how"
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>



More information about the Users mailing list