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@gmail.com
Tel: 07857154817 Google Talk/Email: luke.milbourne@gmail.com mailto:luke.milbourne@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)