<div dir="ltr">I resolved the issue, but I not quite sure why is worked. Rather than sending the REGISTER with t_reply(), I changed it to call route(RELAY) which does this:<div><br></div><div>
route[RELAY] {<br> xlog("L_NOTICE","route[RELAY] ($rm)\n");<br><br> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {<br> if (!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");<br>
}<br><br> if (is_method("INVITE|SUBSCRIBE|UPDATE")) {<br> if (!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");<br> }<br><br> if (is_method("INVITE")) {<br> if (!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");<br>
}<br><br> xlog("L_NOTICE","t_relay()'ing ($rm)\n");<br><br> if (!t_relay()) {<br> sl_reply_error();<br> }<br> exit;<br>}<div class="gmail_extra"><br></div><div class="gmail_extra">I thought that maybe the issue was that I was getting a 100 TRYING right before the 401, and maybe I needed to setup a reply route as well. However, as you can see above, MANAGE_REPLY isn't set for REGISTERs. Why did this fix the problem?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Marc</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 11:52 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Are you sure you have set
t_on_failure() for the respective transaction?<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
On 03/03/14 17:44, Marc Soda wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">So I've found out that NAT has nothing to do with
it. The bit about things working when the NAT device is removed
was wrong.
<div><br>
</div>
<div>So my question becomes: Why would Kamailio ignore a 401
rather sending it to a failure route?</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>Marc</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Mar 3, 2014 at 9:10 AM, Marc
Soda <span dir="ltr"><<a href="mailto:msoda@coredial.com" target="_blank">msoda@coredial.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">I forget to mention, the nat device is in
front of the Kamailio servers, not the endpoints.</div>
<div class="gmail_extra">
<div>
<div><br>
<br>
<div class="gmail_quote">On Fri, Feb 28, 2014 at
6:22 PM, Marc Soda <span dir="ltr"><<a href="mailto:msoda@coredial.com" target="_blank">msoda@coredial.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">I have a Kamailio server setup
which is registers to a back end server on
behalf of endpoints. The endpoints can
register to Kamailio but Kamailio is failing
to register to the server when I put a NAT
device in front of it. Without the NAT device
it works fine.
<div>
<br>
</div>
<div>The problem is the 401 that comes back
seems to be ignored by Kamailio. I have a
failure route setup to auth, but it is never
hit. I see the 401 in onrely_route, but not
the failure_route. I'm assuming it's a NAT
issue because removing the device fixes the
issue.</div>
<div><br>
</div>
<div>Anyone have any ideas?<br clear="all">
<div><br>
</div>
<div>The 401 being ignored:</div>
<div><br>
</div>
<div>
<div>SIP/2.0 401 Unauthorized<br>
</div>
<div>Via: SIP/2.0/UDP
10.0.10.11;branch=z9hG4bKe5d6.178378f7.0;received=198.XXX.XXX.XXX</div>
<div>Via: SIP/2.0/UDP
127.0.0.1:12354;rport=6545;received=198.XXX.YYY.YYY;branch=z9hG4bK-1879-1-3</div>
<div>From:
<a><sip:sip7878_spqa@64.YYY.YYY.YYY></a>;tag=1</div>
<div>To:
<a><sip:sip7878_spqa@64.YYY.YYY.YYY></a>;tag=as00e32130</div>
<div>Call-ID: <a href="mailto:1-1879@127.0.0.1" target="_blank">1-1879@127.0.0.1</a></div>
<div>CSeq: 2 REGISTER</div>
<div>User-Agent: CoreDialPBX</div>
<div>Allow: INVITE, ACK, CANCEL, OPTIONS,
BYE, REFER, SUBSCRIBE, NOTIFY, INFO</div>
<div>
Supported: replaces</div>
<div>WWW-Authenticate: Digest
algorithm=MD5, realm="<a href="http://fe-c7c5-9o.domain.com" target="_blank">fe-c7c5-9o.domain.com</a>",
nonce="151e4f60"</div>
<div>Content-Length: 0</div>
</div>
<div>
<br>
</div>
<div>Thanks,</div>
<div>Marc</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class=""><font color="#888888">
</font></span></pre><span class=""><font color="#888888">
</font></span></blockquote><span class=""><font color="#888888">
<br>
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>
</div></div></div>