[OpenSIPS-Users] drouting / is_from_gw - matching for groups and not types
bogdan at opensips.org
Fri Feb 4 13:51:57 CET 2011
Considering you still wan to use the dr_rules table (for the mapping of
users to groups), I would manually do the query (with avp_db_query() )
from the script (to get the group id) and only for certain values of the
group ID I will do do_routing("group_id")
Max Mühlbronner wrote:
> sorry maybe i did not explain well enough. Because what you describe
> is exactly how i am using groups/rules already. :)
> But my problem at this point is, for one group i dont want to use the
> GW List/Gateway defined in the rule matching this group. Only for
> this single group i want to use the load_balancer module / e.g.
> load_balance. So what i am looking for would be something to check
> which group id the current call belongs too... But i guess there is no
> such function?
> Max M.
> Am 02.02.2011 22:42, schrieb Bogdan-Andrei Iancu:
>> Hi Max,
>> The Group ID is linked to group ID from the dr_rules table. The idea
>> is to group the rules in different sets, for different scenarios
>> (routing to GW, routing to Media Services, etc)
>> This Group Id can be provided to the do_routing() function (you can
>> determine it via whatever other mechanisms - like avp_db_load) or if
>> not given, the do_routing function will automatically query (using
>> the FROM URI as key) the dr_groups table.
>> In OpenSIPS CP, in Settings, for Group IDs, you can fill in the
>> groups ID you are using on the system -> they are only used by CP
>> when creating new rules, to give you the options.
>> Max Mühlbronner wrote:
>>> regarding opensips-cp and drouting i came across a small problem,
>>> maybe someone already tried something similar and wants to share his
>>> knowledge :)
>>> opensips-cp --> Drouting / Settings, Gateway Types / Group ID´s is
>>> what i am talking about.
>>> Is there any function to check for the Group ID´s instead of
>>> Gateway types inside the routing script?
>>> |is_from_gw and goes_to_gw only checks for types of Gateways but i
>>> can not find any equivalent to check for gateway group ids? The
>>> Group ids are assigned via permissions and i am selecting the group
>>> ids via avp_db_query.
>>> My goal is to decide by group ids which calls
>>> (permissions/group-based) are routed directly to load_balance
>>> function instead of going through the normal drouting process of
>>> rules/gateway(lists). I could eventually use a avp_db_query to get
>>> the group id for every call but this would probably use lots of
>>> Database Resources? Maybe there is another smarter way to do all of
>>> Best Regards
>>> Max M.
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami, USA
OpenSIPS solutions and "know-how"
More information about the Users