Nils Ohlmeier wrote:
On Thursday 12 July 2007 12:54:58 Martin Hoffmann
wrote:
Techically, there is no such thing. There is only ACKs to 2xx and
non-2xx responses. The former are always in-dialog requests, since the
2xx creates the dialog should it not yet exists. The latter is a matter
of the transaction layer which doesn't know of dialogs.
You call them non-2xx ACKs, I called them out-of-dialog ACKs (because the
typical scenario for them is the acknowledgment of the 40[17] for the INVITE,
and there is no dialog yet). But we are speaking about the same here.
Finally figured that from your reply to Klaus.
In practice,
an ACK to a non-2xx response always needs to be eaten by
tm. This t_relay() does. Any ACK to a 2xx response needs to be routed
like any other in-dialog request to the endpoint (save for some
elaborate processing such as authentication). Which means, my code
snipped does indeed lack a loose_route() before t_relay().
Ok, what is the loose_route suppose to do in this case?
A 2xx ACK would be "routed" according to the Route headers by loose_route(),
and relayed by t_relay() then.
Meaning, it gets the treatment it deserves.
And what about the pre-loaded non-2xx ACKs?
I would treat them exactly the same way like the 2xx ACK. loose_route() will
consum the Route header and t_relay() then forwards it to the RURI (which
should be your proxy).
Now you made me read tm sources again. What actually happens inside tm
when you call t_relay() is that t_lookup_request() matches the
transaction the ACK belongs to, t_newtran() releases that transaction,
and t_relay_to() stops the script.
Thus, the call the loose_route() doesn't hurt, in the non-2xx case it
effectively is a no-op.
But as I explained in my other reply
to Klaus it is quite tricky to distinguish a non-2xx ACK with pre-loaded
Route, from a 2xx ACK with just one Route header. Then the only difference is
the RURI.
There is another one: For the former you have a transaction, for the
latter you don't. tm happily exploits this difference. No need to worry
in your config.
Regards,
Martin