Block incoming calls from specific numbers
Spam and other malicious calls have become a common problem. For many reasons, you may want to block incoming calls from a specific number. Use Genesys Cloud Architect to block incoming calls from specific numbers.
To block incoming calls from specific numbers, follow these steps:
- Click Admin.
- Under Architect, click Architect. Genesys Cloud Architect opens in a new tab.
- Create a new inbound call flow or edit an existing one.
- From the toolbox, expand the Task menu and drag the Task action to the Reusable Tasks area.
- Click More and select Set this as the starting task. The reusable task becomes the Starting Task, the Initial Greeting appears in the Starting Task area, and the Main Menu moves to the bottom of the page to Reusable Menus.
- From the toolbox, expand the Data menu and add an Update Data action to the task editor and perform these tasks:
- (Optional) rename the action.
- Click Add update statement, choose Create Collection, and then PhoneNumber Collection.
- Give Variable Name 1 a name, for example, Task.blockedNumbers, and press Enter.
- Click the +PhoneNumber button below Value To Assign 1.
- Enter the first phone number that you want to block. For more information, see Phone number data type.Note: You can only add one number per item.
- To add additional numbers, click Phone number and repeat steps d-e.
- Expand the Logical menu, add a Decision action below the Update Data action, and perform these steps:
- (Optional) rename the action.
- Click Expression Modes and select Expression .
- Click Open large expression editor and use this expression to detect whether the incoming call is in the blocked list or not: Count(Find(Task.blockedNumbers, ToPhoneNumber(Call.Ani))) > 0.
- Click Close.Note: When the decision output is Yes, it indicates that the number you are receiving the call from is on the blocked list, while No indicates that it’s not.
- Add a Disconnect action below the Yes path. This step disconnects a call that you receive from the blocked list.
- Expand the Audio menu and add a Play Audio action below the No path. This step adds a customized message to the callers who are not on the blocked list.
- Under Audio, type the text for the callers to hear and then press Enter.
- Add an appropriate action below the Play Audio action. For example, Transfer to ACD or Jump to Menu, etc. In this case, expand the Menu category, and then add a Jump to Menu action to your task editor. From the Menu list, select Main Menu.
- Click Save and then click Publish.
To test your new flow, call it from a blocked number.