External mask is nothing to do with inbound calls.
can you check if there is any translation pattern (beginning with 555) to convert the number from 5552XXX to 2XXX?
What I guess is, instead of passing only 4 significant digits, all digits are received & processed in CUCM.
I thought translation pattern is call from CUCM phones to PSTN. Correct me if I am wrong, my knowledge in voice not that good, I could not see any translation pattern beginning with 555. As for Called party transformation pattern, I could see some pattern,
\+55511.XXXXXXX with predot discard digits.
and calling party transformation pattern with
also with predot discard digits
Both the ISDN and ccapi is for outgoing.
Please find ISDN debug for MGCP GW
*Apr 8 17:30:58.131: ISDN Se0/0/0:23 Q931: RX <- SETUP pd = 8 callref = 0x0095
Bearer Capability i = 0x8090A2
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA98381
Exclusive, Channel 1
Progress Ind i = 0x8583 - Origination address is non-ISDN
Calling Party Number i = 0x4180, '5554444'
Called Party Number i = 0xC1, '5553003'
*Apr 8 17:30:58.143: ISDN Se0/0/0:23 Q931: TX -> RELEASE_COMP pd = 8 callref = 0x8095
Cause i = 0x8081 - Unallocated/unassigned number