Please review those and let us know if any of them fix the problem.
If you still can't get it working, please attach a pastebin of your freeswitch logs that demonstrate this happening.
Ultimately someone will need to spend some time reviewing these logs, so you need to demonstrate that you have done your homework (analyse the logs yourself, tell us what you think the problem is, outline what you have tried so far, and what you think the solution might be) etc.
You don't, we aren't a proxy, we are a B2BUA, so each leg will have its own call-id!
I seem to remember using the "sip_invite_call_id" variable successfully, which is handy, even for a B2BUA. You still have the From/To tags to differentiate the inbound/outbound dialogs, so there isn't, strictly-speaking, a reason for a B2BUA to not allow to pass-thru the call-id I think ...