routes pushed by the AR are not used when canceling a proxybranch
The application router is allowed to push routes using the route and routeback
The problem is that when the CANCEL is created for an outgoing proxy, the routes
pushed by the AR are NOT copied and the CANCEL fails miserably since it is
routed to nodes that do not know the session.
I've been looking into the proxy implementation and I think I see the
problem with this.
There are three copies of the request;
- the original request before proxying
- the cloned request that is passed to the proxybranch.
This is the request which the application modifies (e.g., adds headers
etc.). This is because when the application later receives responses, the
getRequest() on these responses should return the original request and not the
request as it might have been modified downstream.
- the forward request, which is a cloned version of the proxybranch's
This is the request that is actually dispatched. The container sets some
stuff on this.
The problem is that the ApplicationRouter modifies the forward request
before it leaves the container.
However, the cancel is based on the proxybranch request.
Result; the cancel does not contain the AR's pushed routes.
There might be related issues which have not been explored fully.
E.g,, when the AR pushes an internal route, it is not actually added to the
request, but instead made available to the application with the getPoppedRoute()
call. For the CANCEL handling, when an application in the chain does a
getPoppedRoute() it should see the same poppedRoute as when handling the invite
request, but this is probably also broken due to this issue.
Also for UACs (or B2Bs) it has not been investigated whether routes pushed by
the AR are preserved for the cancel,
The suggestion is to write a number of testcases with a route pushing AR and
validate the various scenarios.
The same issue exists in boh 1.0 and 2.0