Re: [SR-Users] Randomizing t_load_contacts() with same q value?
Daniel-Constantin Mierla writes: > > 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? t_load_contacts() loads the contacts into an xavp. You can rearrange them according to your wishes before starting to call t_next_contacts(). -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Randomizing t_load_contacts() with same q value?
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 ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Randomizing t_load_contacts() with same q value?
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? ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users