On Fri, 08 Apr 2011 13:12:15 +0200 Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
you use forward() which is stateless forwarding, which means the LB kamailio doesn't detect when the selected destination is down in order to re-route to alternative. Anyhow, you should do re-routing in the config by using failure_route[x] block.
See the readme of dispatcher module for devel version, it has improved example, showing how to do failure routing:
http://kamailio.org/docs/modules/devel/modules_k/dispatcher.html#id2866599
Cheers, Daniel
Ok, I now completely understood the different. I rewrote my script based on your comments and the example and it now works perfectly. I fought a little with the fail over time, but modparam("tm", "fr_timer", 2000) solved this issue. For completeness I attached the working configuration to the mail.
Thanks for your support.
Best Regards, Sören
route[ASTERISK_CONFERENCE_AUTH] { # Conference bridges if ($rU=~"(33[0-4]$)") { if (!ds_select_dst("1", "4")) { sl_send_reply("500", "No destination available"); exit; } } }
route [ASTERISK_CONFERENCE] {
if ($rU=~"33[0-4][0-4][0-9][0-9][0-9][0-9]$") { if (!ds_select_dst("2", "8")) { sl_send_reply("500", "No destination available"); exit; } } if ($rU=~"33[0-4][5-9][0-9][0-9][0-9][0-9]$") { if (!ds_select_dst("3", "8")) { sl_send_reply("500", "No destination available"); exit; } } }
failure_route[DISPATCH] { if (t_is_canceled()) { exit; } if (t_branch_timeout() && !t_branch_replied()) { xlog("L_NOTICE", "Entering failure route\n"); if(ds_next_dst()) { t_on_failure("DISPATCH"); t_relay(); exit; } }
}