[OpenSIPS-Users] query cashed dr_rules table

Liviu Chircu liviu at opensips.org
Mon Oct 4 06:01:19 EST 2021


On 02.10.2021 00:31, Marcin Groszek wrote:
> Is there a way to query cashed dr_rules table?
>
> I know it can be done by avp_db_query("SELECT count(prefix),attrs from 
> dr_rules where.... but this will be resource hungry.

Hi,

See the "dr_number_routing" MI command [1], it provides a way to do the 
longest-prefix matching using the data that's currently cached by 
opensips, rather than the SQL table content.

[1]: https://opensips.org/docs/modules/3.3.x/drouting.html#idp5987920

Best,

-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS eBootcamp 2021: www.opensips.org/training




More information about the Users mailing list