<font face="arial, helvetica, sans-serif">Hello,
</font><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I'm attempting to write a config to perform near-end NAT traversal on Opensips 1.7. I'm having a problem with the loose_route of the ACK after the 200 OK, and if I wait long enough, the BYE as well.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Here's the scenario. An INVITE comes in the WAN side and is t_relay'd to the LAN side. The LAN-side UAS sends a 200 OK, and that is relayed back to the WAN-side UAC. So far, so good. Then the WAN-side UAC sends the ACK to the 200. Opensips relays this from its own WAN IP to its own LAN IP - I found it with ngrep on the lo interface. Eventually Opensips sends a 408 back to the UAC.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Here's the relevant portion of the config, based largely on the included sample. This works fine with single-interface configurations:</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><div> if (has_totag()) {</div><div> if (loose_route()) {</div><div> if (method=="INVITE") record_route();</div>
<div> if (!t_relay()) sl_reply_error();</div><div> exit;</div><div> } else {</div><div> if (method == "ACK") {</div><div> if (t_check_trans()) {</div>
<div> if (!t_relay()) sl_reply_error();</div><div> exit;</div><div> } else {</div><div> exit;</div>
<div> }</div><div> }</div><div> sl_send_reply("404", "Not Here");</div><div> }</div><div> exit;</div>
<div> }</div><div><br></div><div>I've verified with xlogs the ACK hits in the loose_route() portion of the config. It does hit t_relay, but it relays the message to itself on its 'other' IP. I've tried to look the extended debugs but I'm not finding anything telling. Unfortunately I don't have any experience with multiple interface configurations. I suspect it has something to do with the double Via lines added, one from each interface. Perhaps it's not detecting the second Via as its own? (Even if that were the case, I can't explain why it's not responding to itself on the lo interface.)</div>
<div><br></div><div>I do have mhomed=1 enabled. Without it the initial invite doesn't arrive at the LAN-side UAS.</div><div><br></div><div>I've experimented with check_via, aliases, etc. No effect. Any suggestions on where to go from here?</div>
<div><br></div><div><br></div><div><br></div><div>- Jeff</div></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="courier new, monospace"><br></font></div>