<div dir="ltr">Hey all,<div><br></div><div>I've got two layers of Kamailio proxies running. One set of edge proxies that are parking outbound connections and doing load balancing to a set of registrar/proxies. This is working well with one exception:</div><div><br></div><div>I can't seem to get t_load_contacts/t_next_contacts working correctly for handling multiple outbound connections. It <i>appears</i> to work (though I haven't extensively tested) whenever there's more than one registration binding for an AOR. However, when there's only one, I get:</div><div><br></div><div><div><font face="monospace"> 8(27) DEBUG: tm [t_serial.c:191]: t_load_contacts(): nr_branches is 0</font></div><div><font face="monospace"> 8(27) DEBUG: tm [t_serial.c:194]: t_load_contacts(): nothing to do - only one contact!</font></div><div><font face="monospace"> 8(27) DEBUG: tm [t_serial.c:455]: t_next_contacts(): no contacts in contacts_avp - we are done!</font></div><div><font face="monospace"> 8(27) ERROR: <script>: t_next_contacts() failed</font></div></div><div><font face="monospace"><br></font></div><div>I tried omitting the call to t_next_contacts(), thinking it should possibly only be used in failure_route. But when I do that (while leaving t_load_contacts), I get:</div><div><br></div><div><div><font face="monospace"> 5(24) ERROR: tm [t_fwd.c:1730]: t_forward_nonack(): ERROR: t_forward_nonack: no branches for forwarding</font></div><div><font face="monospace"> 5(24) WARNING: <core> [receive.c:258]: receive_msg(): error while trying script</font></div></div><div><font face="monospace"><br></font></div><div>The relevant part of the config is:</div><div><br></div><div><div><font face="monospace">  if (!lookup("location")) {</font></div><div><font face="monospace">    $var(rc) = $rc;</font></div><div><font face="monospace">    switch ($var(rc)) {</font></div><div><font face="monospace">      case -1:</font></div><div><font face="monospace">        xlog("L_INFO", "$ci|log|lookup of contacts for $ru returned no results\r\n");</font></div><div><font face="monospace">        send_reply("404", "Not Found");</font></div><div><font face="monospace">        exit;</font></div><div><font face="monospace">      case -3:</font></div><div><font face="monospace">        xlog("L_INFO", "$ci|log|lookup of contacts for $ru failed with code $var(rc)\r\n");</font></div><div><font face="monospace">        send_reply("404", "Not Found");</font></div><div><font face="monospace">        exit;</font></div><div><font face="monospace">      case -2:</font></div><div><font face="monospace">        send_reply("405", "Method Not Allowed");</font></div><div><font face="monospace">        exit;</font></div><div><font face="monospace">    }</font></div><div><font face="monospace">  }</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">  if (!t_load_contacts() || !t_next_contacts()) {</font></div><div><font face="monospace">    xlog("L_ERR", "t_load_contacts() failed\n");</font></div><div><font face="monospace">    sl_reply_error();</font></div><div><font face="monospace">    t_release();</font></div><div><font face="monospace">    exit;</font></div><div><font face="monospace">  }</font></div></div><div><font face="monospace"><br></font></div><div>Am I missing something else here? Note: it works fine if I remove t_load_contacts/t_next_contacts, but then I don't get proper handling of multiple sip.instance bindings/differing q values.</div><div><br></div><div>Best,</div><div>Colin</div></div>