I've been having problems getting CallerID to be recognised on my TDM400P.
I tried paying with the gain, but it made no difference.
The patch here
solved all my detection problems.
To quote the post:
Some UK BT lines seem to be able to trigger a false ring on the tdm400p at exactly 380ms after the CID starts. This results in * giving up on the CID and going into a fallback state where it just gets on with the call