We have multiple (virtual phone numbers) going to single PSTN line and same with VoIP. Currently the calls do come through, but are all grouped together. We need to identify which number the user dialed in order for us to handle the call correctly.
We have checked with our providers and they are sending the DNID information. Here is a sample of the header that we receive:
I tried that and no luck. The problem is that at the point it gets to the dial planin Asterisk it is all from the same account; therefore it all appears from the same number. We need access to the dialed number dnid which gets sent to Asterisk in the header through the “t:” field.
When I display the dnid through Asterisk it gives me the account number which is same for all virtual numbers.
I see the “t:” field which contains the dialed number in the SIP header and I can’t touch it.
Done the NoOp with all the variables that are listed in the docs. I even tried the channel variables and no progress. All values referencing the caller id work, but value DNID shows the account/user for the SIP account which is same for all the virtual numbers, and RDNIS is blank.
It is frustrating because I can see the info in the header and can’t seem to touch it. Is there any way to access the SIP header sent to Asterisk and parse it myself?
I found a solution after a many days of searching. I have to give the credit to the user on this site - sorry for violating any link references for this forum but I need to place credit where it is due.