[OpenSIPS-Users] Return GW IP

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Mar 5 10:13:09 EST 2019


Hi Mark,

The Dynamic Routing module is doing routing based on prefix/number - 
that's what the engine knows. Of course you can combine with source IP 
by translating/mapping groups of src IPs into routing groups.

Not sure what you are expect the module to do, if you want to route only 
based on SRC and DST IPs....In order to have drouting setting a 
destination GW, you need to do the actual routing (via do_routing()).

Regards,

Bogdan-Andrei Iancu

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

On 03/05/2019 04:01 PM, Mark Farmer wrote:
> Hi all
>
> I'm using drouting and I need to route calls to various Gateway types 
> based on $si and destination IP but it seems that $dd is not known at 
> this point.
> How can I get the IP address of the destination gateway from the 
> drouting database and assign it to a usable variable?
>
> I'm thinking something like this:
>
> if ($si =~"^(10\.*)" && goes_to_gw("1")) {
> $dd = ???????
>                 }
>
>
> Many thanks
> Mark.
>
>
> -- 
> Mark Farmer
> farmorg at gmail.com <mailto:farmorg at gmail.com>
>
>
> _______________________________________________
> 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/20190305/55a6d1ce/attachment.html>


More information about the Users mailing list