<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;"><div>Hi!<br><br>I have a Kamailio 1.5.2 handling 3XX messages. The commands below<br>are executed in a failure route. If the first contact is not reachable or<br>even a negative answer is received, the algorithm will call a second failure <br>route, executing the 't_next_contacts'. Following this logic, the server will<br>try several endpoints. The first 200 OK received from one this endpoints<br>will establish the call. If all the contacts are tried, the server will <br>finish the session with sending an error to the source. <br><br>get_redirects("15:15","Redirect");<br>
if(!t_load_contacts())<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp; t_reply("500", "Server Internal Error - Cannot load contacts");<br>
&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
};<br>
if(!t_next_contacts())<br>
&nbsp;&nbsp;&nbsp;&nbsp; t_reply("404", "Not found");<br>
else<br>
&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br><br>Ok... I found just one problem. If the 3XX message brings 5 different contacts,<br>(all them with different q value), Kamailio just try 4 of them. <br><br>Contact: sip:20182#556250982222@aaa.aaa.aaa.aaa;q=0.015,<br>sip:3441#556250982222@bbb.bbb.bbb.bbb;q=0.014,<br>sip:3441#556250982222@ccc.ccc.ccc.ccc;q=0.013,<br>sip:50014#556250982222@ddd.ddd.ddd.ddd;q=0.012,<br>sip:777#556250982222@eee.eee.eee.eee;q=0.011<br><br>After the 300 message, the server sends a invite to the first contact.<br>Seconds later, analysing the debug screen, I see:<br><br>DBG:tm:t_next_contacts: next contact is &lt;sip:3441#556250982222@bbb.bbb.bbb.bbb<br><br>The INVITEs are sent to this IP. After some seconds the server calls the third contact:<br><br>DBG:tm:t_next_contacts: next contact is &lt;sip:3441#556250982222@ccc.ccc.ccc.ccc<br><br>And so on until this, the last contact:<br><br>DBG:tm:t_next_contacts: next contact is
 &lt;sip:777#556250982222@eee.eee.eee.eee<br>ERROR:core:add_avp: 0 ID or NULL NAME AVP<br>ERROR:tm:t_next_contacts: setting of fr_inv_timer_avp failed<br><br>The proxy sent INVITEs for all them, except the last one because this failure. The function <br>'t_next_contact' returns an error value. Somebody has a hint about this? <br><br>Regards,<br>bruno machado<br></div>
</div><br>


      <hr size=1>Veja quais são os assuntos do momento no Yahoo! + Buscados: <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/">Top 10</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/">Celebridades</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/">Música</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/">Esportes</a></body></html>