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
Why are you concerned? ODBC reconnects automatically if necessary.
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.
Unless of course the database server is not running at all for some reason. Regards;
Surely that should be monitored by some system designed for that purpose such as Nagios?
But that’s not exactly an Asterisk problem.
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?
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?
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