Odbc Connection Timeout Varable
Hi all Does anyone know of a variable that i could check to see if the reason func odbc didnt return results was because of a timeout error so i could play a audio file about that
thanks
Hi all Does anyone know of a variable that i could check to see if the reason func odbc didnt return results was because of a timeout error so i could play a audio file about that
thanks
12 thoughts on - Odbc Connection Timeout Varable
Why are you concerned? ODBC reconnects automatically if necessary.
jg
I would like to tell callers the system is down as apposed to saying no info in system when the system is up or saying the info in the system
It takes a small fraction of second to reconnect. You should not experience any missing info.
jg
Unless of course the database server is not running at all for some reason. Regards;
JVC
—–Original Message—
Surely that should be monitored by some system designed for that purpose such as Nagios?
But that’s not exactly an Asterisk problem.
jg
right but that is the problem and i was wondering if there is way for asterisk to set a variable when that happens just like curl
It should not happen. I have a couple of Asterisk servers using the ODBC connection. I never ever had any problem with ODBC or the database. What database are you using?
jg
well it should but this morning my database hosted at a remote location was down due to conditions at the remote site
the question isnt if it should happen or not
the questions is there a way for me to know that the odbc query retruned empty because of a connection timeout?
in curl i could get that info is there a way also for odbc?
So, your DB is not on the same machine? WAN or LAN?
jg
To just answer your question:
No, there is no channel variable for this, nor anything in Asterisk that does this automatically.
You would need to have something else monitoring your databases, and use it to inform Asterisk of the failure.
thanks for the reply