Hi All,
I would like to reduce the time it takes for kamailio to timeout an initial message to a dispatcher destination so that it will select the next destination in the set, before, hopefully, a restransmission. In this case I am testing registration messages.
I came accross the t_set_fr() function in the TM module documentation today and have been experimenting with it for some hours. I have an issue where a 408 timout is sent back to the UAC before the last destination in the dispatcher set is selected, I suspect I am hitting the timeout somewhere, but I cannot see where, I presume the fr_timeout is set every time I issue the t_set_fr() call and the associated t_relay.
I'm just wondering if I am doing this correctly, if one of the guru's out there wouldnt mind casting an eyeball over this config and let me know if I am on the right track, or if I am going about this in the wrong way. Any suggestions are most welcome.
What appears to be happening is, I have 3 destinations in the dispatcher set, it looks like the 1st 2 are tried, which correctly timeout and are set inactive-probing, but on the last destination, which is working, I appear to be getting a 408 timeout being sent back from kamailio.
Here is a snip of my configuration:
#!define NO_RESPONSE_TIMER 250
request_route { t_on_failure("DISPATCHER_FAILURE"); t_set_fr(0, NO_RESPONSE_TIMER); if(!ds_select_dst("1", "0")) { xlog("L_ERR", "No dispatcher destinations available for $ru\n"); sl_send_reply("500", "No destination available"); exit; } route("RELAY") }
route[RELAY] { if (!t_relay()) { sl_reply_error(); } exit; }
failure_route[DISPATCHER_FAILURE] { if (t_is_canceled()) { exit; }
# select next destination only for local timeout if (t_branch_timeout() && !t_branch_replied()) { xlog("L_INFO", "route[DISPATCHER_FAILURE] : $rm : timeout and no reply ($si:$sp->$Ri:$Rp->$du)\n"); xlog("L_INFO", "route[DISPATCHER_FAILURE] : $rm : setting $du to probing state"); ds_mark_dst("ip"); if(ds_next_dst()) { xlog("L_INFO", "route[DISPATCHER_FAILURE] : $rm : next destination selected ($du)\n"); t_set_fr(0, NO_RESPONSE_TIMER); t_relay(); exit; } else { xlog("L_INFO", "route[DISPATCHER_FAILURE] : $rm : No destinations available for $rd"); send_reply("500", "No destination available"); exit; } } }