Logs attached, plus a diagram of the expected call flow.
The application is a proxy under control from an external system.
After authentication, the INVITE is proxied to the destination
(192.168.0.53). We push a Route:
<sip:192.168.0.21;lr> for the
next hop.
In the log file, we start the outbound INVITE at about line 1251 and
the extra Route header gets added at line 1423. We also have an
outboundProxy configured for the load balancers, so this gets
another Route: header as well.
After that it may get confusing, because the proxy tries to route
the request back to the MSS (default destination) due to the
incorrect Routes, eventually causing a 404.
I did a little experiment and removed the 'balancers' and
'outboundProxy' lines from server.xml. When the INVITE was
forwarded, it only had a single Route: header. Is this issue
possibly due to using an outboundProxy and/or balancers? I'll try
and get a trace of that as well...
Hugh