<div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks for the reply, certainly a few options to consider :)<div><br></div><div>To be more specific, the table contains $ua identifiers:</div><div><br></div><div><div>MariaDB [tt]> select * from user_agent;</div><div>+----+------------------+</div><div>| id | ua |</div><div>+----+------------------+</div><div>| 1 | sipcli |</div><div>| 2 | sipvicious |</div><div>| 3 | sip-scan |</div><div>| 4 | sipsak |</div><div>| 5 | sundayddr |</div><div>| 6 | friendly-scanner |</div><div>| 7 | iWar |</div><div>| 8 | CSipSimple |</div><div>| 9 | SIVuS |</div><div>| 10 | Gulp |</div><div>| 11 | sipv |</div><div>| 12 | smap |</div><div>| 13 | friendly-request |</div><div>| 14 | VaxIPUserAgent |</div><div>| 15 | VaxSIPUserAgent |</div><div>| 16 | siparmyknife |</div><div>| 17 | Test Agent |</div><div>+----+------------------+</div></div><div><br></div><div>What I'd like to do is something like:</div><div><br></div><div>if($ua ~=(search_ua_column_for_match) {</div><div> exit;</div><div>}</div><div><br></div><div>I should add that I'm using OpenSIPS 3.0</div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2019 at 13:31, Alexey Kazantsev via Users <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Mark,<br>
<br>
I haven't understood well enough what data do you store in the table.<br>
<br>
Something designed by OpenSIPS developers? E.g. 'subscribers' table.<br>
Or some custom data which you use in your script say via AVPs?<br>
<br>
If it's possible to store it as key-value pairs, I'd recommend you using<br>
local cache [1], [2], [3]<br>
<br>
[1] <a href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc4" rel="noreferrer" target="_blank">https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc4</a><br>
[2] <a href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc5" rel="noreferrer" target="_blank">https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc5</a> <br>
[3] <a href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc6" rel="noreferrer" target="_blank">https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc6</a> <br>
[4] <a href="https://opensips.org/html/docs/modules/3.0.x/cachedb_redis.html" rel="noreferrer" target="_blank">https://opensips.org/html/docs/modules/3.0.x/cachedb_redis.html</a> <br>
[5] <a href="https://opensips.org/html/docs/modules/3.0.x/cachedb_sql.html" rel="noreferrer" target="_blank">https://opensips.org/html/docs/modules/3.0.x/cachedb_sql.html</a><br>
[6] <a href="https://opensips.org/html/docs/modules/3.0.x/exec.html" rel="noreferrer" target="_blank">https://opensips.org/html/docs/modules/3.0.x/exec.html</a> <br>
<br>
Depending on your OpenSIPS architecture it can be more optimal to use Redis [4],<br>
for example in case of OpenSIPS cluster.<br>
<br>
You may use CACHEDB_SQL [5] (I never used it).<br>
You may execute some script with the EXEC [6] function.<br>
<br>
If your table is tiny and your system architecture allows it,<br>
you may store data not in MariaDB but in SQLite.<br>
<br>
So, as you see, many things depend on the overall size of your system,<br>
and it's not so easy to give some certain advice without knowing<br>
its architecture and load level.<br>
<br>
<br>
<br>
-----------------------------------------------<br>
BR, Alexey<br>
<a href="http://alexeyka.zantsev.com/" rel="noreferrer" target="_blank">http://alexeyka.zantsev.com/</a><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mark Farmer<br><a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a></div>