Add A-Leg Call-ID as X-CID on B-Leg

To add a new SIP header, there is this example:

To extract the call-id, I did not find any example, but the call parameter is:
sip_call_id
So it should be simple to extract. See Routing Script Parameter Mapping - TB Wiki

If needed, TelcoBridges can do a script like this with professional services.