[OpenSIPS-Users] How to change From user before do_routing?

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jun 5 07:20:52 EDT 2018


Hi Kirill,

Well, internally, the drouting module is also doing a query to DB , to 
the dr_group table (there is no cache here) -> so, it is the same, when 
comes to performance. Or you can keep the per-user routing group in the 
subscriber table and have it loaded during authentication (see the 
load_credential parameter).

And again, the dr_groups is not cached, it is a real time query to DB 
;). Only the rules/carriers/gateways are cached, but not the groups.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 06/05/2018 01:58 PM, Kirill Galinurov wrote:
> Hello Вogdan. Thanks for answer. I thought so. I want to use db, and 
> cache_db to store groups. But our new system is very highload. About 
> 6M rules over 120 groups and 300 cps. So what about perfomance ? 
> Internal drouting groups is in memory and it very good.
>
> 2018-06-05 11:39 GMT+03:00 Bogdan-Andrei Iancu <bogdan at opensips.org 
> <mailto:bogdan at opensips.org>>:
>
>     Hello Kirill,
>
>     The drouting module is fetching the original FROM header, as
>     received from the network. So your changes from the script will be
>     ignored.
>
>     An alternative is to determine the routing group by yourself, at
>     script level (like doing a DB query, even to the same dr_groups
>     table, but using whatever value you want for the user) and push
>     the group as parameter to the do_routing() function.
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>        http://www.opensips-solutions.com <http://www.opensips-solutions.com>
>     OpenSIPS Summit 2018
>        http://www.opensips.org/events/Summit-2018Amsterdam
>     <http://www.opensips.org/events/Summit-2018Amsterdam>
>
>     On 06/01/2018 05:05 PM, Kirill Galinurov wrote:
>>     Hi all. I use drouting module for LCR. No i use do_routing
>>     function in request_route() But i want normalize username in From
>>     before do_routing.
>>     How I can do it. Now do_routing() use old username for discover
>>     group.
>>     Also I want to change username in contact field before topology
>>     hiding.
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>     <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180605/643233cf/attachment.html>


More information about the Users mailing list