<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Lucida Console'; font-size:9pt; font-weight:400; font-style:normal;">On Mittwoch, 27. Mai 2009, CSB wrote:<br>
&gt; I wish to implement a kind of a failover situation, probably using the<br>
&gt; dispatcher module. We want to monitor our gateways by performing a range of<br>
&gt; tests (not just a ping or INFO but also waiting for a specific response to<br>
&gt; an INVITE). If the test fails then we want to mark a gateway as unavailable<br>
&gt; until the tests are successful again.<br>
&gt;<br>
&gt; Based on a bit of reading I think we could use the dispatcher module in<br>
&gt; database mode. We could run a script that performs the tests and marks the<br>
&gt; destination as inactive if the test fails. If that would work, can anyone<br>
&gt; advise how we mark a destination as inactive? It looks like the MI function<br>
&gt; ds_set_state does this but can I update the database directly? If so what<br>
&gt; field do I need to update?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Hi Cameron,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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:<br>
http://www.kamailio.org/docs/db-tables/kamailio-db-1.5.x.html#AEN1716<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>But if you edit the database anyway, then you could probably just remove this destination completely and reload the cache.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Cheers,<br>
Henning</p></body></html>