This may be one of a number of issues. First of all, do you receive the number of the caller? If so then CID is working through the gateway. Next, check the 3CX logs to see if a name, along with the number is showing. If not, then confirm with your provider that the Caller Name feature is included in your service. Most companies charge extra as, in most cases, a look-up must be done in a database not owned by the provider. They must pay the holder of that database.
If your provider confirms that you do have the feature, and, the name is not showing in a 3CX log of an incoming call, then, suspect an issue with the gateway.