If both source and destination channel are capable of signalling caller ID, caller ID will be passed through the Dial application automatically.
Note though that fromname, in sip.conf, will break outbound caller ID signalling, so if you need to use fromname, you should investigate whether the peer supports P-Asserted-Identity or Remote-Party-ID, and set the sendrpid option correctly. If for some reason the upstream peers is using the equivalent of fromname, you should investigate whether trustrpid=yes helps.
Otherwise you are going to need to provide details of your dialplan, your sip.conf, and probably the caller ID parts of the result of core show channel on both party A and part B during a call. The output from sip set debug on with both the incoming and outgoing INVITEs would also be useful.