I'm using opensips as a transparent proxy server. Original flow of messages is following
Client -------> OpenSips (Invite request)
OpenSips ------------> FS (Invite to Freeswitch)
FS -------------> Opensips (Reply from FreeSwitch)
Opensips ------------------> Client (Reply back to Client)
I'm using dialog module to save dialog state and topological_hiding module to change contact header. It's working fine until FreeSwitch send BYE message. On Freeswitch BYE, opensips generate 404 not here response.
According to configuration of opensips loose_route() return false. Opensips never send BYE to client.
Note: BYE message has same dialog as Invite request.