2010/4/16 Benjamin Lawetz benjaminlawetz@gmail.com:
I strongly suggest not to do that. Instead:
- The UA sends an invite to Kamailio
- Kamailio uses LCR module to randomly select asterik-1 or asterisk-2.
- Kamailio sends the request to the selected asterisk.
- If there is a failure (to inspect in failure_route) Kamailio uses
next_ge() (LCR module) and routes the INVITE to the other asterisk.
This will work really better.
Good idea, hadn't thought of a retry for the invite (was thinking of removing the server from the dispatch if it failed, but your idea is better). I'm guessing this doesn't add too much load to Kamailio. For learning/understanding the dispatcher... was what I wanted to do possible?
Please, keep the mail within the maillist thread.
No, it doesn't add too much load to Kamailio. This is one of the major purposes of a transaction stateful proxy (the serial forking in order to implement failover). Take a look to the LCR module. It gives you load balancing (with priorities if you want) and failover features. It's all you need in your scenario.