I thought this would be possible with TCP too.
I looked at the outbound module but this is a 'drop in' replacement for something that already exists, so I'm trying to avoid rewriting headers as would be required for flow IDs etc, however it's a definite preferred method for improvement.
As an aside, and it may be the same issue in
https://www.mail-archive.com/sr-users@lists.kamailio.org/msg15589.html, when you force an outbound socket on a specific port and a reply is received on that port, both $Rp and $Rut show the port on the first listen directive, not the port it was actually received on, which makes it a bit harder to do what I was trying to as well :/