[OpenSIPS-Users] drouting get_group_id behavior

Maciej Bylica mbsip at gazeta.pl
Thu Feb 27 12:18:04 CET 2014


Hi Alexander,

Thanks for feedback.


2014-02-27 3:09 GMT+01:00 Alexander Mustafin <mustafin.aleksandr at gmail.com>:

> Hi!
>
> Bacause drouting do not accept .* in dr_rules - you may use dialplan
> module for this. Just catch domain name with regex and $avp(dest) will
> store name of rule for drouting, as example.
>
> С уважением,
> Александр Мустафин
> mustafin.aleksandr at gmail.com
>
>
>
> 26 февр. 2014 г., в 20:45, Maciej Bylica <mbsip at gazeta.pl> написал(а):
>
> Hello,
>
> Thanks for reply.
> Yeah i did it by asking db for..
> avp_db_query("SELECT groupid FROM dr_groups WHERE domain =
> '$fd'","$avp(i:600)");
> and then using exactly the same avp for do_routing.
> It works, but i am still wondering how to match domain different way (
> do_routing())
>
> Thanks.
>
>
> 2014-02-25 18:52 GMT+01:00 <stephane at shimaore.net>:
>
>> Hello,
>>
>> > I have the same problem on 1.9 rel.
>> > | id | username | domain | groupid | description |
>> > |  4 | .*       | 10.10.10.5  |  0 | TEST
>>
>> If you don't need to match on username why not pass directly the groupid
>> to `do_routing` ?
>>
>>   do_routing("0");
>>
>> If you need to dynamically map between a domain and a groupid, use e.g.
>>
>>   do_routing("$avp(10)");
>>
>> and an AVP table which maps from domains to groupid.
>> S.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> 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/20140227/d894a509/attachment.htm>


More information about the Users mailing list