Like sarond has suggested, check what you receive and if it matches the DDI number after any DDI cut, etc...
Unless it finds a match, it will just follow the trunk group's CDE.
For us, we fare better by setting the DDI lookup from right to left with our SIP trunks. Maybe you could play with that.