I had (have) a similar problem. Slightly different setup, as I'm using an IP trunk.
I don't use any CID override. When I make calls over the IP trunk, sometimes the CID is the extension number, and sometimes it's the correct CID. There seems to be no reason why/how it decides what the CID will...