DID not working with inbound route

I am working with Freepbx v13 Asterisk 11 from Distro and the issue is the inbound route is not picking up on the DID properly. I have confirmed with the voip provider that they are sending 10 digits and when i ran a trace i got the attached output. (it has been sanitized…)

I believe that the “phone-context=national” is what is messing with the DID being recognized and i would like to know how to strip this or isolate the DID. We have 10 inbound DIDs and need to route them correctly. The only way calls are currently being routed is with a catch all “ANY” inbound route. Please help! Thanks in advance.

It’s not clear if you are asking about CID (per the subject) or DID (per the message). It’s also not clear how you’ve sanitized the included sip header.

Does your provider put the DID in the SIP To header? If so, you can use the context from-pstn-toheader for your trunk(s) to have them route properly.

Hi @lgaetz, my apologies. It was a DID questions not Caller ID as i had titled the post. On the SIP header i just removed some of the IP address info and the last few digits of the phone number.

The SIP Provider is putting the inbound DID into the header but the inbound route is not recognizing any of the DIDs. The only way to get a call to come through is to removed the DID filter from the inbound route. My theory was the “phone-context=national” portion is what is messing it up.

So if I add “context=from-pstn-toheader” to the Incoming trunk User Details that should fix the issue?