Sounds like you've not configured the gateway correctly.
You have not given enough info to diagnose the problem to any depth but you need to look at the dial-peer configuration on the gateway for incoming calls, how many digits are you receiving from the carrier and does your dial-peer match this.
Do you need a translation on the call manager for the incoming calls.
You need to start at the begining and work your way from there.
These are the paths to get to each CCX logs through CLI. They may be helpful if you are having issues accessing RTMT or downloading logs through it.
If you want to download them you have to prefix "file get " and you can add one of the options (re...