[OpenSIPS-Users] do_routing function first argument
Răzvan Crainea
razvan at opensips.org
Mon Jan 9 03:25:31 EST 2017
Hello, Khalil!
If you check the documentation of the do_routing function[1], you will
see that the group is not mandatory. If it exists, then it will use the
route set within that group. If it does not exist, the group is
determined from the dr_group table in the database - this is just a
simple mapping between user and group. If you would like to have a more
flexible approach, where you determine the route set using a more
complex logic than a simple matching, then you will have to implement
that logic in the script to find the group, and provide it to the
do_routing() function.
I hope I answered you question now.
[1] http://www.opensips.org/html/docs/modules/2.2.x/drouting.html#id295067
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 01/08/2017 08:23 PM, Khalil Khamlichi wrote:
> Well you get to my point, shouldn't it be in the database then ? whats
> the point in having it hard coded inside the config file ?
>
> On Sun, Jan 8, 2017 at 1:24 PM, Johan De Clercq <johan at democon.be
> <mailto:johan at democon.be>> wrote:
>
> I think that's route set id.
>
> On 08 Jan 2017 12:12 PM, "Khalil Khamlichi"
> <khamlichi.khalil at gmail.com <mailto:khamlichi.khalil at gmail.com>>
> wrote:
>
> Hi eveyone,
>
> I have been trying to understand the first argument to the
> do_routing("1","",,"$var(rule_attrs)")
>
> Can anyone please give some explanation of the first argument
> to this function ? what does the "1" stands for and where does
> it fit in the logic back in the database setup (in my scenario
> it's mostly drouting tables)
>
> Thanks in advance.
>
>
>
> _______________________________________________
> 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>
>
>
> _______________________________________________
> 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>
>
>
>
>
> _______________________________________________
> 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/20170109/36c8131d/attachment.html>
More information about the Users
mailing list