Hi Emily and others,
I used a different method to clean up the ANI, this is more reliable as it also accounts for an anonymous or NOTSET/Empty Call.ANI, and can strips the Sip: or Tel: and/or the "+" if carriers are sending E.164 numbers, you can also then add or replace prefixes, for instance in Australia, Telstra sends 9 digits so your Left(Right code would break.
All of the below first checks if Call.ANI is Empty or Not Set and if it is will put in Anonymous, I put in anonymous because if you have Empty or NotSet it can cause some other actions to fail.
3.1.2 will convert +61 to 0 so that you can add 10 digit australian numbers into your data table for neusence callers numbers
If you are working with Telstra and they are sending you 9 digits you can also use the below to convert to 10 digit
If(Contains(Call.ani,"sip:+61"),
Replace(Call.Ani,"sip:+61","0"),
or
If(Contains(Call.Ani,"sip:"),
Replace(Call.Ani,"sip:","0"),
3.1.1 Call.ANI - Remove SIP or TEL from onlyCLID Filter to check if Call.Ani is empty first then to remove "sip:" and "tel:"
If(IsNotSetOrEmpty(Call.Ani),
"Anonymous",
If(Contains(Call.ani,"anonymous") or Contains(Call.Ani,"Anonymous"),
"Anonymous",
If(Contains(Call.Ani,"sip:"),
Replace(Call.Ani,"sip:",""),
If(Contains(Call.Ani,"tel:"),
Replace(Call.Ani,"tel:",""),
"Anonymous"
))))
3.1.2 Call.ANI - Remove SIP or TEL and convert E.164 to 10 Digit Australian FNNCLID Filter to check if Call.Ani is empty first then to convert +61 into 0 for 10 digit Australian FNN, or just remove "sip:" or "tel:".
If(IsNotSetOrEmpty(Call.Ani),
"Anonymous",
If(Contains(Call.ani,"anonymous") or Contains(Call.Ani,"Anonymous"),
"Anonymous",
If(Contains(Call.ani,"sip:+61"),
Replace(Call.Ani,"sip:+61","0"),
If(Contains(Call.Ani,"tel:+61"),
Replace(Call.Ani,"tel:+61","0"),
If(Contains(Call.Ani,"sip:"),
Replace(Call.Ani,"sip:",""),
If(Contains(Call.Ani,"tel:"),
Replace(Call.Ani,"tel:",""),
"Anonymous"
))))))
3.1.3 Call.ANI – Remove SIP or TEL and Convert 10 Digit Australian FNN to E.164CLID Filter to check if Call.Ani is empty first then then convert 0 to +61 if we receive 07x / 04x / 03x etc, or just remove "sip:" and "tel:".
If(IsNotSetOrEmpty(Call.Ani),
"Anonymous",
If(Contains(Call.ani,"anonymous") or Contains(Call.Ani,"Anonymous"),
"Anonymous",
If(Contains(Call.Ani,"sip:0"),
Replace(Call.Ani,"sip:0","+61"),
If(Contains(Call.Ani,"tel:0"),
Replace(Call.Ani,"tel:0","+61"),
If(Contains(Call.Ani,"sip:"),
Replace(Call.Ani,"sip:",""),
If(Contains(Call.Ani,"tel:"),
Replace(Call.Ani,"tel:",""),
"Anonymous"
))))))
------------------------------
Nathan Kaden
CALLSCAN AUSTRALIA PTY. LTD.
------------------------------
Original Message:
Sent: 01-19-2022 14:31
From: Emily Kammerer
Subject: Blocking prank calls
Hi Brenda
Not sure if this is what you need, but here's the task in one of my call flows. Prior to using a data table, I was adding each number to be blocked to each call flow, which was a difficult to manage and time consuming. The data table works great. If the caller ANI is found on my data table ("DA Nuisance Numbers"), it disconnects; if not, it moves on to the next designated task in the flow.

------------------------------
Emily Kammerer
Ascendium Education Solutions, Inc.
Original Message:
Sent: 01-19-2022 14:16
From: Brenda Wynne
Subject: Blocking prank calls
Any examples of call flows that can be shared here?
------------------------------
Brenda Wynne
Alcon Vision LLC
Original Message:
Sent: 04-17-2021 11:34
From: Raghavapvds Raghavapvds
Subject: Blocking prank calls
Hi,
Yes you can block it and following method.
1.Create a DB table and add the ANI numbers to be blocked.
2.In the IVR Check the ANI starting of the call by DB lookup and if matches ANI number disconnect it or if yes go for next step in the flow.
------------------------------
Raghava PVDS
Cognizant Technology Solutions India
Original Message:
Sent: 04-16-2021 08:30
From: Pietro Messina
Subject: Blocking prank calls
Good morning to everyone,
Is it possible to block incoming calls from a specific telephone number on PureCloud? (like a blacklist)
This is because we have a customer that is receiving a lot of prank calls from a specific telephone number and he wants to block them.
Thank you in advance.
Best regards,
Pietro Messina
TechneValue GmbH
pietro.messina@technevalue.com
#PlatformAdministration
#Routing(ACD/IVR)
#SystemAdministration
#Telephony
------------------------------
Pietro Messina
TechneValue GmbH
pietro.messina@technevalue.com
------------------------------