[SR-Users] app_lua sr.sqlops.query exit status

jenus at cyberchaos.nl jenus at cyberchaos.nl
Tue Jan 9 20:53:10 CET 2018


Daniel,

Currently running kamailio 5.0.5.

Jan

Daniel-Constantin Mierla schreef op 2018-01-09 13:27:
> Hello,
> 
> what version of kamailio are you using?
> 
> Cheers,
> Daniel
> 
> 
> On 07.01.18 22:14, jenus at cyberchaos.nl wrote:
>> Hello,
>> 
>> I'm doing some tests with a lua script and app_lua. I'm using
>> sr.sqlops.query to insert records into the database but would like to
>> test the exit status of the sql query. In kamailio i can do:
>> 
>> if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
>> 
>> Is there some kind of exit status for the lua function sr.sqlops.query
>> in order to do the same check in lua? In other words, is it possible
>> to check if a sql query was successful in lua? The result seems to be
>> nill in all cases for a INSERT in lua using sr.sqlops.query.
>> 
>> 
>> Thanks,
>> 
>> Jan Hazenberg
>> 
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




More information about the sr-users mailing list