[SR-Users] A Couple of Questions about carrierroute moduel

JR Richardson jmr.richardson at gmail.com
Wed May 26 22:01:17 CEST 2010


On Wed, May 26, 2010 at 2:23 AM, marius zbihlei <marius.zbihlei at 1and1.ro> wrote:
> JR Richardson wrote:
>>
>> Hi All,
>>
>> I'm testing carrierroute module on version: kamailio 1.5.4-notls
>> (i386/linux).
>>
>> I'm distributing calls to a group of Asterisk servers, all in the same
>> carrier and domain, wanted to load balance the calls and I'm curious
>> how this works.  I see the 'probability' parameter in the carrierroute
>> table and set it to equal value across all servers, I have 4 servers
>> I'm sending calls to, so I set each prob value to '0.25'.  I'm testing
>> with sipp  and hashing over call_id so this is the same for every
>> call.  I send 40 calls and the distribution of calls to the asterisk
>> servers are 11, 12, 6, 11, pretty close to even but not 100%
>>  How does the distribution algorithm work for carrieroute?  Does it
>> statefully track all active calls and load balance across each server
>> in destination group?  Is there another algorithm that can offer that
>> can get closer to a round robin effect?
>>
>
> Hello JR,
>
> The distribution algorithm works by doing a CRC32 on the Call_id(I suppose
> you use cr_route not cr_prime_route), and dividing than number so it
> reflects the probability you gave . Your data sample is too small to show
> the correct distribution; if you can test with a 2000 calls scenario, and
> the Call-Id is randomized as it should, then the distribution will be
> uniform. The carrierroute module does not keep track of balanced calls.

Hello,

I am using cr_route, not cr_prime_route.  I tested with large call
samples, 2K and 10K, the call distribution was within 1% accross all
servers, very nice.

>>
>> Another question is do I need to include the record_route() and the
>> t_check_trans() functions prior to calling the carrierroute functions?
>>  I see in the debug "DBG:core:forward_reply: found module tm, passing
>> reply to it" and dialogs seem to process fine, so does the
>> carrierroute module handle those requirements for stateful processing?
>>
>> Thanks.
>>
>>
>
> AFAIK, the decision to call record_route() is orthogonal with the
> carrierroute module. The same for stateful / stateless processing (you can
> use carrierroute module both stateless or statefull depending on what you
> want)
>>
>> JR
>>
>
> Cheers
> Marius
>

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses



More information about the sr-users mailing list