This is a sub-issue of issue 2060, see that issue for more information on the
scenario and the logs etc.
The proxy earlier send a provisional response which resulted in a virtual branch
(with to-tag tt1).
The following requests and responses are received by the proxy application:
INVITE request – SS1
112 (branch)response – SS1 (of course, SS4 does not exist yet) to-tag = tt1
180 (branch)response – SS4 (since this created a new branch) to-tag = tt2
487 response – SS1 (why on SS1?) to-tag = tt1
[this causes SS1 to be invalidated!]
CANCEL request - SS1 (requestURI = sip:proxy_uas, so this is the internal UAS
[even though a getSession() gives SS1, SS1.isValid() now returns false...]
487 response – SS1 with to-tag = tt3 ?
487 (branch)response – SS1 with tt=tt1
CANCEL request – SS1 now with the original request URI
There are two non-branch 487 responses!
One might be on the (virtual) UA and one on the proxy, but it is impossible for
the proxy to distinguish these, AFAIK.
Only the first 487 response send to the application matches the 487 best
response that is eventually send back to A.
There is no 487 reported with to-tag tt2, either because the B2B does not send
this, or because it somehow gets mangled.
There is a non-branch 487 response with to-tag tt3, but no branch-response with