Hi Gang
I guess, I don't completely understand who to properly perform serial
branching.
I did try to follow the examples from:
https://www.kamailio.org/docs/modules/devel/modules/tm.html#tm.f.t_next_con…
This is, stripped down, the relevant config used.
modparam("tm", "contacts_avp", "tm_contacts")
modparam("tm", "contact_flows_avp", "tm_contact_flows")
route[LOCATION]
{
lookup_to_dset("location", "$var(lookupuri)");
if (!t_load_contacts(1)) {
xlog("L_ERR", "$cfg(route): ######### load_contacts failed\n");
sl_send_reply("500", "Server Internal Error - Cannot load
contacts");
exit;
}
xlog("L_INFO", "$cfg(route): Contacts loaded:
$cnt($xavp(tm_contacts))\n");
=> Confirms, there is more than one contact loaded.
if (!t_next_contacts()) {
send_reply("480", "Not registered");
}
t_set_fr(5000,1500); # Set 5 second timeout for LAB testing to quickly try the next
contact.
t_on_branch("BR_TO_CUST");
t_on_branch_failure("BR_TO_CUST_FAILURE");
exit;
}
event_route[tm:branch-failure:BR_TO_CUST_FAILURE] {
xlog("BRANCH FAILED $T_reply_code to $rm message\n");
t_on_branch("BR_TO_CUST");
t_on_branch_failure("BR_TO_CUST_FAILURE");
if (t_next_contact_flow())
{
xlog("BRANCH FAILED, Try Next\n");
t_relay();
} else {
xlog("L_INFO", "No more flows\n");
t_reply("408", "Branch Timeout");
exit;
}
}
What happens is:
INVITE is sent to the first contact, who is replying RINGING.
After 5 seconds the timeout is reached and the branch-failure route engaged.
Jan 17 15:01:15 dev-cpereg01 kamailio[3599432]: ERROR: <script>: BRANCH FAILED 408
to INVITE message
Jan 17 15:01:15 dev-cpereg01 kamailio[3599432]: INFO: <script>: No more flows
Jan 17 15:01:15 dev-cpereg01 kamailio[3599432]: CRITICAL: tm [tm.c:1554]: ki_t_reply():
w_t_reply entered in unsupported mode
To my understanding, t_next_contact_flow() should have loaded the next ds, but this does
not seem to happen.
What am I missing?
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web
http://www.imp.ch
______________________________________________________