[SR-Users] Using =~ to get the group identifier with longest match

David Villasmil david.villasmil.work at gmail.com
Mon Jun 6 15:05:21 CEST 2011


Hello Iñaki,

I had much the same traffic, and with a good index that wouldn't be a
problem, IMHO.
You could also load the table in memory, can't be faster than that.

Of course, doing it in the config script is faster, but it limits your
flexibility... just a thought...
I even got the rate and created a "custom" cdr for each call. we had around
4k concurrent calls at that time (like 5 years ago)

Anyway, good luck!

David

On Mon, Jun 6, 2011 at 2:52 PM, Iñaki Baz Castillo <ibc at aliax.net> wrote:

> 2011/6/6 David Villasmil <david.villasmil.work at gmail.com>:
> > I connected to mysql and ran something like:
> > select * from routes where '$rU' like concat(areacode,'%') order by
> > len(areacode) desc limit 1;
>
> Hi David, that would work indeed, but I prefer not to saturate the DB
> with such a query which cannot use table indexes. My kamailio handles
> 2000-3000 concurrent calls and such calls come from callcenters so
> they are very "aggressive" (maybe 200-300 calls in the same second),
> so querying the database with a low performance query is not an option
> in my case.
>
> Thanks.
>
> --
> Iñaki Baz Castillo
> <ibc at aliax.net>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110606/a42a0ba3/attachment.htm>


More information about the sr-users mailing list