[OpenSIPS-Devel] [OpenSIPS/opensips] a500c6: drouting: Add the "rule_tables_query" feature
Liviu Chircu
noreply at github.com
Fri Mar 19 13:15:56 EST 2021
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: a500c6bd3b474cb286188f42f653fcbd18b83e56
https://github.com/OpenSIPS/opensips/commit/a500c6bd3b474cb286188f42f653fcbd18b83e56
Author: Liviu Chircu <liviu at opensips.org>
Date: 2021-03-19 (Fri, 19 Mar 2021)
Changed paths:
M modules/drouting/doc/drouting_admin.xml
M modules/drouting/dr_load.c
M modules/drouting/dr_load.h
M modules/drouting/drouting.c
Log Message:
-----------
drouting: Add the "rule_tables_query" feature
This patch adds optional support for an SQL-based way of building a set
of dr_rules-compatible table names, to be each loaded and joined into a
single "dr_rules" table, for any chosen partition.
Usage example, where we build a single "dr_rules" table out of two
other ones, named "dr_rules_a" and "dr_rules_b":
modparam("drouting", "rule_table_query", "MY_RULES_QUERY:
SELECT 'dr_rules_a' UNION SELECT 'dr_rules_b'")
For the "MY_RULES_QUERY" token to be recognized, it must be provided as
the name of the "dr_rules" table inside the partition DB entry,
i.e. the `dr_partitions.drr_table` column.
This module parameter may be set multiple times, where each definition
will update the query for the respective "dr_rules" table name (token).
Credits to Vlad Paiu for the initial prototype of this concept!
More information about the Devel
mailing list