I have often come across a SIP vendor that uses the CLI for billing purposes. This can be an issue when A (External PSTN party) calls B (lync DDI user) which is forwarded or transferred to C (external PSTN party).
In this case the true caller A cannot be shown as the calling party as the SIP vendor cant bill that caller.  In this instance you will find that the vendor supports refered-by headers, not something that is enabled on Lync by default.

On each Mediation server do the following:’
Edit the file MediationServerSvc.exe.config found in C:\Program Files\Microsoft Lync Server 2010\Mediation Server so that it looks as follows:-



In my example I have 2 gateways as shown by the 2 add key lines.
The Mediation Services will need a restart to take effect

Microsoft reference