[OpenSIPS-Users] Routing Based on $si and $Ri

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Aug 5 09:50:31 CEST 2015

Hi Trevor,

Why not using the dialplan module which allows you do operate with 
custom data, it does regexp search and caching too.


Bogdan-Andrei Iancu
OpenSIPS Founder and Developer

On 04.08.2015 21:32, Trevor Steyn wrote:
> Hi All,
> I would like to be able to route calls based on Source IP and 
> Destination IP (always one of opensips IPs), As usual there are many 
> ways to skin a cat,
> My first thought was to have a table such as the address table but 
> modify the IP field to a concatenation of $si and $RI
> so you would have a table like this
> *************************** 1. row ***************************
>           id: 6
>          grp: 1
>           ip:
>         mask: 32
>         port: 0
>        proto: udp
>      pattern:
> context_info: Route=2;Forced_Socket=
> So in the route script i would do something like this
> /check_cource_address("1",$si+"_"+$Ri) /
> Obviously i cannot just do this with the permissions module as it wont 
> accept this in the IP field as it expects a valid IP,
> So before i go down that road i was wondering if anyone knows an out 
> of the box way i can do this without impacting performance, I could 
> easily use avp_ops for this but as far as i can see  it does a db 
> query for every transaction, this is not something that needs to be 
> called for every new sip transaction it should be loaded into memory 
> at startup.
> Your thoughts would be appreciated I would just like to be pointed in 
> the right (Best possible way to do this) direction.
> Regards
> Trevor Steyn
> _______________________________________________
> 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/20150805/2711ff3d/attachment.htm>

More information about the Users mailing list