Sorry for the first post. I tried to search for this topic, but I couldn’t really find what I am looking for.
I inherited a rather large asterisk 1.8 deployment with MySQL back end. It works extremely well for handling our call traffic, voicemails, etc. I am now facing a challenge where I need to validate that the Caller ID that is set by the SIP end points are valid for that end point. My criteria is below:
ext 1-234-555-1234 calls outbound number, call is checked if Caller ID is set to 234-555-1234. If it is set to that, then it passes the call on to the outbound trunk. If it is set to “private”, then it passes to the outbound trunk. If it is set to anything else, it is either overwritten with “234-555-1234” or the call is dropped.
This may be as simple as checking the SIP headers, and making sure that either the privacy flag is set, or that the number contained in the from header is the same as in the P-Asserted-Identity header, however I don’t know if the P-Asserted-Identity header can be trusted from the authenticated SIP devices, or if it even exists?