<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Trevor,<br>
<br>
Why not using the dialplan module which allows you do operate with
custom data, it does regexp search and caching too.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 04.08.2015 21:32, Trevor Steyn
wrote:<br>
</div>
<blockquote cite="mid:55C1052B.8040302@webon.co.za" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>