Dear All,<br><br>I'm getting the From/To header inconsistnet after a uac_replace_from/to, I'm using uac_replace_from/to one time in the main Route, and and another on a BranchRoute after got a failure in the first branch.<br>
<br>As i could understand in the UAC documentation it's not possible to call the replace function more then once in a branch, but it's not may case I'm creating a new branch on the failure route, and calling the replace from the branch route, follow the script snippet bellow [1]:<br>
<br>The request generated for the second GW (Branch route) generates the From/To header wrongly, the header becomes the first branch value concatenated with the second branch value, see bellow:<br><br>From: <b><span style="color: rgb(255, 0, 0);"><a href="mailto:sip%3A111133445566@192.168.191.105">sip:111133445566@192.168.191.105</a></span><span style="color: rgb(0, 0, 153);"><a href="mailto:sip%3A221133445566@192.168.191.105">sip:221133445566@192.168.191.105</a></span></b>;tag=BSHdtMPF6bZNkSKa7YW3PsS1hWtAdLJC.<br>
To: <b style="color: rgb(255, 0, 0);"><a href="mailto:sip%3A110001888888@192.168.191.105">sip:110001888888@192.168.191.105</a></b><b style="color: rgb(0, 0, 153);"><a href="mailto:sip%3A220001888888@192.168.191.105">sip:220001888888@192.168.191.105</a></b>.<br>
<br>The red values are the first branch values, and the blue values are the second branch values.<br><br>Does anybody has some idea to help me? Am I making something wrong?<br><br>[1] -------------------------------------------------<br>
route{<br> ...<br> uac_replace_from("", "sip:$avp(s:from)@$fd");<br> uac_replace_to("", "sip:$avp(s:to)@$td");<br> ...<br><br> if (!t_relay()) {<br> sl_reply_error();<br> };<br>
}<br><br><br>failure_route[1] {<br> t_on_branch("1");<br> if(!next_routing()) {<br> t_reply("$err.rcode", "$err.rreason");<br> exit;<br> }<br> append_branch();<br><br> if (!t_relay()) {<br>
sl_reply_error();<br> };<br>} <br><br>branch_route[1] {<br> ...<br> uac_replace_from("", "sip:$avp(s:from)@$fd");<br> uac_replace_to("", "sip:$avp(s:to)@$td");<br> ...<br>
}<br><br>Best regards,<br><br clear="all">Antonio Anderson Souza<br>Voice Technology<br><a href="http://www.antonioams.com">http://www.antonioams.com</a><br>