CID Forwarding with VoIP gateways

Hello everybody, I write here, after spending many hours in searching and trying different solutions.

I have an Asterisk server and some gateways (with FXS and FXO ports) registering via SIP on the server.
Some FXO ports are configured with an hotline to trasfer automatically calls to other FXS ports. My problem is on how to transfer the CLID calling the FXO to the FXS, and how to record that CLID into CDR for reports.

From what I can see, gateways are correctly configured and send correctly information on the SIP session. For example I enclose one capture of the debug:
<
– SIP read from 192.168.15.2:5060:
INVITE sip:39028@mydomain SIP/2.0
Via: SIP/2.0/UDP 192.168.15.2:5060;rport;branch=z9hG4bKjv20ej42bra99zy755cg
From: "0481750111"sip:39029@mydomain;tag=5450u22jg0n901h6y1a5
To: sip:39028@mydomain
Contact: sip:[email protected]:5060
Call-ID: [email protected]
CSeq: 6793 INVITE
MAX-Forwards: 70
Content-Type: application/sdp
Content-Length: 238

In this example “0481750111” called the FXO port, bound to account 39029. On the gateway there’s an hotline that trasfers automatically calls to account 39028 (FXS on another gateway).
On the destination phone’s display I see 39029 instead of 0481750111 and the same happens on reports (39029 has called 39028, not 0481750111 has called 39028).

I guess that the problem at this point is in my asterisk configuration, but I cannot see where the problem can be. Any help is really appreciated.

Thanks in advance