On Friday 27 February 2009, BERGANZ François wrote:
I have 1 SER and 5 ASTERISK.
I dispatch SIP with my own logic to choose the asterisk.
I need in my scrypt to choose among actives asterisk.
Then, how to know which asterisk is active? Is it possible that the SER
OPTIONS each asterisk(s) and put the result is a database ?
There are several possibilities on how to define 'active'. You could send
OPTIONS like you suggested or you could try to setup actual calls over some
test numbers with sipp or sipsak. Then you could insert the state in a DB, or
use some FIFO commands (e.g. with cr) do change the routing. You could
implement this with some small python or bash scripts.
But if you go for the OPTIONS path, then the easiest way would be to just use
the dispatcher module, which already does this checking for you.
Cheers,
Henning