<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi All, <br>
<br>
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, <br>
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<br>
<br>
so you would have a table like this<br>
<br>
<br>
*************************** 1. row ***************************<br>
id: 6<br>
grp: 1<br>
ip: 196.2.97.165_41.213.100.100<br>
mask: 32<br>
port: 0<br>
proto: udp<br>
pattern: <br>
context_info: Route=2;Forced_Socket=41.213.100.200<br>
<br>
So in the route script i would do something like this<br>
<br>
<i>check_cource_address("1",$si+"_"+$Ri) </i><br>
<br>
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, <br>
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.<br>
<br>
Your thoughts would be appreciated I would just like to be pointed
in the right (Best possible way to do this) direction.<br>
<br>
Regards<br>
Trevor Steyn<br>
<br>
<br>
<br>
</body>
</html>