[SR-Users] Function to test DB connection from route[]?

Allen Zhang Allen.Zhang at imgtec.com
Thu Nov 7 05:31:58 CET 2013


Hi all,

Is there a function I can use to test database connection from the routing script in the cfg file?
My dispatcher uses OPTIONS probing. When the destination receives the OPTIONS request, I'd like to detect the health status of the database connection before sending a 200 back.
Note the OPTIONS request doesn't have a user part in the RURI. Hence, is_subscriber() and alias_db_lookup() don't work.

Any suggestion?

Regards,

Allen Zhang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131107/cd96e72e/attachment.html>


More information about the sr-users mailing list