I’ve run into an issue where I’d like calls marked as anonymous or no caller ID to be routed to a separate area than calls that display their phone number.
This is because our system needs to log their phone number in order for some systems to operate.
As of such, I’d like callers who have not displayed their number to be played a pre-recorded message and then hung up on.
If anyone has a solution to this I’d be greatly thankful.
Or, set up your regular Inbound Route to have CallerID Number _X.
and then create an Any (Caller ID Number left blank) route to catch anything that doesn’t begin with a digit.
Didn’t look like it worked.
Real calls still went to the wrong destination.
Not sure how to get call logs. Also, I’m having an issue where it’s hard for me to mimic a withheld call because my number provider somehow still manages to find the number haha. That’s why its taking long for me to test it out.
On my mobile (T-Mobile, Google Pixel 4a 5G), I can call anonymously by dialing with *67 in front of the number, or by going to Phone → Settings → Calling Accounts → T-Mobile → Additional Settings → Caller ID and choosing Hide Number.
Of course, if your trunking provider supplies P-Asserted-Identity on blocked calls and you have custom dialplan to fish that out, then your number will still be displayed. But if that’s the case, you should see very few ‘anonymous’ calls (only those from spammers, etc.)
The log for a call is typically a few hundred lines. Select all the entries for the incorrectly routed call, paste it at pastebin.freepbx.org and post the link here.
I’m suspecting that there is a quirk or bug associated with routes with DID set to Any.
See whether setting CID Priority Route for the time condition route causes it to take that path.
If not:
The called number on your logged call shows as 0 – do you know what causes that? I would expect 10 or 11 digits there.
How many DIDs do you have? Are they associated with multiple inbound trunking providers?
I assume that you mean connects to 0@serverip (that is what is in the SIP URI).
If setting CID Priority Route doesn’t help, try setting DID Number for both routes to 0
Or, setting the Context for the trunk to from-pstn-toheader will likely cause the actual dialed number to appear as the DID.
Looks like setting it to “_X.” and setting the CID priority to the time conditions route worked. I’ll need to get someone to test it for the withheld route and probably international calls to make sure those still work.