[Solved] Pattern matching on DID / rewriting DIDs in Inbound routes

I see two possibilities:

  1. It’s possible the To: header on inbound invites has more consistently formatted DID strings in which case you can set the trunk context to from-pstn-toheader and filter calls that way.

  2. 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.