On Mittwoch, 27. Mai 2009, CSB wrote:
I wish to implement a kind of a failover situation,
probably using the
dispatcher module. We want to monitor our gateways by performing a range of
tests (not just a ping or INFO but also waiting for a specific response to
an INVITE). If the test fails then we want to mark a gateway as unavailable
until the tests are successful again.
Based on a bit of reading I think we could use the dispatcher module in
database mode. We could run a script that performs the tests and marks the
destination as inactive if the test fails. If that would work, can anyone
advise how we mark a destination as inactive? It looks like the MI function
ds_set_state does this but can I update the database directly? If so what
field do I need to update?
Hi Cameron,
don't know all the details about the dispatcher module, but it seems in the
database scheme there is no field to indicate the activity of a destination:
http://www.kamailio.org/docs/db-tables/kamailio-db-1.5.x.html#AEN1716
But if you edit the database anyway, then you could probably just remove this
destination completely and reload the cache.
Cheers,
Henning