The possible causes are as follows:
The TGLD is not configured correctly.
The minimum number length (minlen) is set to 0.
The trunk module is responsible for changing the calling number. The calling number can be changed only when the called number sent to the trunk module is not empty. When the minimum number length is set to 0, the called number sent to the trunk module may be empty. As a result, the trunk module does not change the calling number. Therefore, the minimum number length must be greater than 0.