Hi,
I need to use a database that may sometimes timeout and I'd like to give a conditional sip response based on whether there was a timeout or not. I'm using sqlops with mysql modules. Does anyone know if that's possible ?
Thanks,
Leon
Hello,
try to evaluate the return value of the sqlops command. You should get a “-1” when the query execution fails.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: Leon de Rooij leon@exquisip.nl Sent: Freitag, 24. März 2023 07:29 To: sr-users@lists.kamailio.org Subject: [SR-Users] different sip response on database (mysql) timeout
Hi,
I need to use a database that may sometimes timeout and I'd like to give a conditional sip response based on whether there was a timeout or not. I'm using sqlops with mysql modules. Does anyone know if that's possible ?
Thanks,
Leon
Hello,
there is no propagation of specific connector errors to the upper layer, sqlops can be used with many connectors, some using directly the hard drive like sqlops. Maybe something can be added to db_mysql to get last error, but it would require C developement.
So far the scope was to be able to detect it failed and eventually to respond with 500 server error.
Cheers, Daniel
On 24.03.23 07:29, Leon de Rooij wrote:
Hi Daniel, Henning,
Thanks for the info - I will experiment a bit further, maybe just detecting the failure is good enough, otherwise I'll see if it's worth digging a bit in the code :)
regards,
Leon
On Fri, Mar 24, 2023 at 4:16 PM Daniel-Constantin Mierla miconda@gmail.com wrote: