I'm generating a 302 reply from kamailio. In this 302 I append new branches with new
if($var(routing)=~"redirect"){
jansson_get("contacts_len", "$var(evmsg)", "$var(contacts_len)");
xlog("L_INFO", "Contacts len $var(contacts_len)");
$var(i) = 0;
while ($var(i) < $var(contacts_len)){
jansson_get("contacts[$var(i)]", "$var(evmsg)", "$var(contact)");
append_branch($var(contact), "0.5");
$var(i) = $var(i) + 1;
}
send_reply("302", "Moved Temporarily");
exit;
}
I all ready tried with remove_hf('Contact') and adding the new ones after that but it doesn't worke either.
The problem is that one gw takes the first contact over and over again and never the other two.
Thanks in advance.
Diego.