I see two possibilities:
-
It’s possible the
To:
header on inbound invites has more consistently formatted DID strings in which case you can set the trunk context tofrom-pstn-toheader
and filter calls that way. -
Otherwise you want to pre-process inbound invites with a block of custom dialplan that will adjust DID for more consistency. You can get the basic framework from this post, but I’m sure there are posts here that more accurately match what you’re trying to accomplish.