[OpenSIPS-Users] Question about qrouting module
Abdoul Osséni
abdoul.osseni at gmail.com
Mon Mar 2 08:05:48 EST 2020
Hello Liviu,
Thank you for your mail.
If I understand well, with dynamic-weights algorithm, for example if I set:
- warn_threshold_asr = 40
- warn_penalty_asr = 1
So, if the gateway defined on each rule has an ASR < 40, so the gateway
will have a penality = 1.
and when I call do_routing() function, qrouting choose the gw that has the
lowest score.
am I right?
Regards
Abdoul.
https://www.africallshop.com/
Le jeu. 27 févr. 2020 à 16:45, Liviu Chircu <liviu at opensips.org> a écrit :
> On 27.02.2020 17:26, Abdoul Osséni wrote:
>
> I want to test qrouting module.
> Do you have some qrouting configs examples?
> Regards
>
> Hey, Abdoul!
>
> It's quite an "out-of-the-box" solution, you'd be surprised. Here are
> some provisioning tips:
>
> * provision any qrouting profiles you want to play with in the
> "qr_profiles" table [1]
> * in dr_rules, make sure to set the "sort_alg" column to 'Q' in order to
> enable qrouting for each rule
> * in dr_rules, for each 'Q'-enabled rule, set the "sort_profile" to your
> desired profile "id" taken from the "qr_profiles" table
>
> From here on, it's just a matter of loading up the modules and setting up
> the "db_url" modparams. The modules will complain if something is missing
> and tell you what to load anyway! :)
>
> Regarding the script: nothing changes. Just call do_routing() [2] as
> usual, and it will both collect stats and sort the destinations based on
> quality. If you want to integrate with custom stats, check out the module
> docs [3], there is plenty of help. Below is the module configuration --
> everything else is just drouting!
>
> Best regards,
>
> [1]:
> https://github.com/OpenSIPS/opensips/blob/master/scripts/mysql/qrouting-create.sql
>
> [2]: https://opensips.org/docs/modules/3.1.x/drouting.html#func_do_routing
>
> [3]: https://opensips.org/docs/modules/3.1.x/qrouting.html
>
> --- qrouting.cfg
>
> loadmodule "db_mysql.so"
>
> loadmodule "drouting.so"
> modparam("drouting", "use_partitions", 1)
> modparam("drouting", "rule_id_avp", "$avp(ruleid)")
> modparam("drouting", "gw_id_avp", "$avp(gwid)")
> modparam("drouting", "db_partitions_url",
> "mysql://root:xxxxxxxxxx@10.0.0.10/opensips"
> <mysql://root:xxxxxxxxxx@10.0.0.10/opensips>)
>
> loadmodule "qrouting.so"
> modparam("qrouting", "algorithm", "dynamic-weights")
> modparam("qrouting", "history_span", 30)
> modparam("qrouting", "extra_stats", "+mos/1; +r_factor/1")
>
> # for fast testing
> modparam("qrouting", "min_samples_asr", 0)
> modparam("qrouting", "min_samples_ccr", 0)
> modparam("qrouting", "min_samples_pdd", 0)
> modparam("qrouting", "min_samples_ast", 0)
> modparam("qrouting", "min_samples_acd", 0)
> modparam("qrouting", "decimal_digits", 3)
>
> modparam("qrouting", "db_url",
> "mysql://root:xxxxxxxxxx@10.0.0.10/opensips"
> <mysql://root:xxxxxxxxxx@10.0.0.10/opensips>)
>
> --
> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
> www.opensips.org/events
> OpenSIPS Bootcamp, Miami, March 2020
> www.opensips.org/training
>
> _______________________________________________
> Users mailing list
> 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/20200302/d9cb7a9d/attachment.html>
More information about the Users
mailing list