[OpenSIPS-Users] drouting get_group_id behavior
Alexander Mustafin
mustafin.aleksandr at gmail.com
Thu Feb 27 03:09:20 CET 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140227/e76637df/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.opensips.org/pipermail/users/attachments/20140227/e76637df/attachment.pgp>
More information about the Users
mailing list