Folks I have a Asterisk based system and I just got service from Nextiva. They state that I need to be looking at the TO field so that the Asterisk can determine which of my 5 DID’s is being dialed.
The issue is that I have 5 DID’s and no matter which if the 5 DIDs all the calls look like the same number ending in 0818. That is the pilot number and the number in my registry string.
I called support and they say I need to set the ASterisk to look at the SIP header for it see the inbound caller ID. Then the Asterisk system will know how to handle it and match it to the inbound route.
how do I set up the system to look at the SIP header TO field so it will read the inbound DID ?
Neither chan_sip or chan_pjsip currently allow routing based on the To header within them. Depending on the channel driver you need to use the mechanism available (SIP_HEADER or PJSIP_HEADER dialplan function) to get the To header and route based on that.
Like I said the modules themselves don’t have the logic to do that so you have to write it. SIP_HEADER and PJSIP_HEADER allow you to retrieve headers in dialplan, including the To header. You would therefore need to retrieve and parse from the dialplan to route. I’m sure examples exist but I don’t have them readily available.