[SR-Users] Kamailio cancel branch only after receiving replies
Aqs Younas
aqsyounas at gmail.com
Mon Jan 2 21:11:34 CET 2017
Greetings list,
I am forking a call to multiple destinations and want to keep the only
branch which sends quicker first 180/183 reply and cancel the remaining
branches. Below is my related cfg snippet.
modparam("tm", "failure_reply_mode", 3)
modparam("tm", "fr_timer", 30000)
modparam("tm", "fr_inv_timer", 120000)
modparam("tm", "cancel_b_method", 2)
...
route[SIPOUT] {
if (uri==myself) return;
append_hf("P-hint: outbound\r\n");
append_branch();
append_branch();
route(RELAY);
exit;
}
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(status=~"[12][0-9][0-9]") {
xlog("L_INFO","Received $rs (IP:$si:$sp)\n");
if(status=~"18[03]"){
t_cancel_branches("others");
xlog("L_INFO","cancelled all other branches\n");
}
route(NATMANAGE);
}
}
...
But I see kamailio does not instantly send CANCEL to other branches after
it has received 180/180 from any branch.
Kamailio is sending CANCEL to other branches after they start sending
180/183 one by one. How can I cancel all other branches instantly?
I am sure there is something wrongly configured in my configuration.
Any suggestion is much appreciated.
Best Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170103/b3d70846/attachment.html>
More information about the sr-users
mailing list