[SR-Users] Randomizing t_load_contacts() with same q value?

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 8 11:26:50 CEST 2018


Hello,


On 07.06.18 16:24, Daniel Tryba wrote:
> I'm looking for a way to randomize the contacts for serial forking if
> they have the same q value (so instead of doing parallel forking to
> those targets).
>
> Without taking the q value into account I could do something with the
> defined contacts_avp before calling t_next_contacts(). But I have no
> idea how to randomize and serialize the branches with the same q value
> after calling t_next_contacts(). Any ideas?
>
the only idea that comes into my mind right now is to play with
$branch(...) variable:

https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#branch_name_-_branch_attributes

You should do it just after lookup location, before doing the load
contacts operation.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com




More information about the sr-users mailing list