<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
In the latest pastebin config you provided the error is still
present. <br>
You have<br>
if(!is_method("REGISTER")) {<br>
if(loose_route()) {<br>
route(1);<br>
}<br>
}<br>
<br>
So for ACKs, you will do loose_route(), it will succeed and then you
will call route(1), which calls rewritehostport() . So basically,
nothing was different compared to your previous scenario, you still
rewrite the RURI for ACKs.<br>
<br>
Please take a closer look at the default scripting scenario that
comes with OpenSIPS. <br>
Basically, the sequential requests processing ( ACKs, ReINVITEs, etc
) should look something like :<br>
<br>
if (has_totag()) {<br>
# sequential request withing a dialog should<br>
# take the path determined by record-routing<br>
if (loose_route()) {<br>
# route it out to whatever destination was set by
loose_route()<br>
# in $du (destination URI).<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
};<br>
exit;<br>
} else {<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
# non loose-route, but stateful ACK; must be an
ACK after-<br>
# a 487 or e.g. 404 from upstream server<br>
t_relay();<br>
exit;<br>
} else {<br>
# ACK without matching transaction -><br>
# ignore and discard<br>
exit;<br>
}<br>
}<br>
sl_send_reply("404","Not here");<br>
}<br>
}<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer</pre>
<br>
On 09/06/2011 06:17 PM, Jock McKechnie wrote:
<blockquote
cite="mid:CACZoz7Qr7NLudAn0hW29NVNAWWuc4i-8xfwwE8V1jZ_otGG=EQ@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">On Mon, Sep 5, 2011 at 2:49 AM, Vlad Paiu
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:vladpaiu@opensips.org">vladpaiu@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Hello Jock,<br>
<br>
I have taken a look at the SIP trace and seems that the
proxy behind Charlie, 192.168.1.1, does some weird stuff to
the ACK. More specifically, it mangles the domain part of
the RURI, so that it points to 192.168.1.4. When Charlie (
192.168.1.4 ) receives this ACK it sees itself in the domain
part of the RURI, so it applies strict routing, by taking
the last route header and putting it in the RURI. This is
why you see the apparent stripping of the username part when
forwarding the ACK.<br>
<br>
I guess a good question is why are you calling <br>
rewritehostport("<a moz-do-not-send="true"
href="http://192.168.1.4:5060" target="_blank">192.168.1.4:5060</a>");
<br>
on the proxy behind Charlie ? Because this is the source of
your problem. I mean why not let the ACK get routed like
every other sequential request, via the Route header.<br>
<br>
</div>
</blockquote>
</div>
<br>
Thank you, Vlad;<br>
<br>
I think I'm following what you're explaining - I'm force-routing
the ACKs instead of letting the handler route them based by the
rules in the header itself. I changed the configuration to the
below, which should only force the INVITE to Charlie, and use a
t_relay() to handle the ACKs, et al, correctly:<br>
<br>
if (is_method("INVITE")) {<br>
# enable Record-Route<br>
record_route();<br>
route(1);<br>
}<br>
<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
}<br>
<br>
Unfortunately this appears to make no difference to how the ACK's
RURI looks. I imagine I'm using the wrong method of forwarding on
the ACK?<br>
(Full config is here, should you want to see it in context: <a
moz-do-not-send="true" href="http://pastebin.com/Zntg2y95">http://pastebin.com/Zntg2y95</a>)<br>
<br>
Thank you, again, for your assistance and suggestions. I am
immensely grateful for all help I receive on this list.<br>
<br>
- Jock<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>