[SR-Users] SQLOPS vs APP_LUA
Fred Posner
fred at palner.com
Wed Dec 2 19:07:06 CET 2015
On 12/02/2015 06:22 AM, Luke Milbourne wrote:
> Hi All,
>
> I need to run some SQL and then set the destination URI according to the
> results, if any.
>
> I've got this working using APP_LUA, however, I've noticed SQLOPS.
>
> Can anyone advise on which method is likely to produce better results.
>
> I'm assuming my Lua function is connecting to the DB and then
> disconnecting each time.
>
> If I use SQLOPS, does this mean Kamailio will keep a connection
> available to the DB?
>
> --
> Luke Milbourne
> <mailto:luke.milbourne at gmail.com>
>
> Tel: 07857154817
> Google Talk/Email: luke.milbourne at gmail.com
> <mailto:luke.milbourne at gmail.com>
>
SQLOPS is a great tool and allows you to free when desired
(sql_result_free) as well as store the query results in xavps (or other
methods). You can run sql queries as well as call stored procedures.
You could easily run the query, store in xavp, free results and the use
the xavps later on (such as in failed route, etc).
Fred Posner
The Palner Group, Inc.
http://www.palner.com (web)
+1-224-334-3733 (direct)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x6235BD69.asc
Type: application/pgp-keys
Size: 3921 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151202/25558999/attachment.key>
More information about the sr-users
mailing list