Hi,
I have the following problem when using t_relay in a failure route: - next hop is correctly set but SIP message is forwaded to a wrong IP address (specifically to the address in request uri)
failure_route[failure] {
if (t_check_status("486|600")) { xlog("L_ERR", "LXLOG FAILURE_ROUTE: forward busy\n"); attr2uri("$tr.forward_busy"); $tu.uid=$tu.uid_busy; route(INBOUND); }
}
In route[INBOUND] several actions are performed including lookup_contacts and NAT_MANGLE
Finally in the route[FORWARD]
if (isflagset(FLAG_FAILUREROUTE)) { xlog("L_ERR","LXLOG: FORWARD: failure flag is set"); append_branch(); }
# if this is an INVITE we might try another # (forwarding or voicemail) target after receiving an error
if (method=="INVITE" && !$to_gw){ xlog("L_ERR","LXLOG: FORWARD: set_failure_route"); t_on_failure("FAILURE_ROUTE"); }
# send it out now; use stateful forwarding as it works reliably # even for UDP2TCP xlog("L_ERR","L_XLOG <%ru> request uri <%nh> <%ds>"); if (!t_relay()) { sl_reply_error(); xlog("L_ERR","LXLOG: FORWARD: !t_relay"); };
drop;
The LOG IS: Feb 7 18:32:40 pc005 ser[11574]: LXLOG: FORWARD: set_failure_route Feb 7 18:32:40 pc005 ser[11574]: LXLOG: %ru = sip:103@192.168.23.237 %nh = sip:100.0.0.2:1037;dstip=100.0.0.1;dstport=5060 %ds = <Contact: sip:103@192.168.23.237;q=0, sip:103@192.168.23.237>
but when I look at the sent packets using ethereal INVITE message is sent to 192.168.23.237 instead that 100.0.0.2.
Do you have any suggestion about possible cause of this behaviour?
Thanks in advance
Martina