If you want to block calls from “anonymous” callers, you can leverage the “CallerID Blacklist” feature. From the 3CX Management Console:
- Go to “Settings” > “Blacklisted Numbers”.
- Click on the “Add” button.
- In the “Blacklist” window:
- Set the “Incoming caller ID to be blocked” field to the value “Anonymous” or “anonymous”. In this case, I have set the field to “*nonymous” to match both values.
- Set the “Description” field for informational purposes.
At this stage, you can check an inbound call and you should see that the anonymous call is rejected correctly.
This is a typical INVITE from a caller whose CallerID is hidden:
INVITE sip:firstname.lastname@example.org:5060 SIP/2.0
Via: SIP/2.0/UDP 22.214.171.124:5060;branch=z9hG4bK7fbdc85f;rport=5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Sometimes your telecom provider will deliver the call with “unknown” or some other text instead of “anonymous” – simply examine the incoming INVITE particularly the “From” field. You can then add or adjust your Blacklist rule accordingly.