We have discovered if a caller elects to create a callback, they will go into the Create Callback data action without issue. However, if their ANI is masked (Private, Anonymous, etc.) There is no error checking in the callback data action to force them to input a valid callback number. It will just accept their confirmation for callback and end the call.
I have not had much success trying to stuff their ANI into a variable when they are not passing a number, but rather something such as "Anonymous." I have also tried building a data table lookup to check their calling info for strings such as "Anonymous" or "private" without any success.
Is there a better way to validate if a caller has a valid ANI before they make it to the create callback data action? The ultimate goal is to force them to put a valid callback number in before they make it to the callback data action.
Try this expression. I think it will be true for blocked numbers, if so use a collect input to get a callback number from them before creating the callback.
IsNotSetOrEmpty(ToPhoneNumber(Call.Ani))
If it doesn't work, write Call.Ani out using a set participant data action and let me know what the value is.
We can't seem to get IsNotSetOrEmpty to work because it's inputting the random string of numbers for some reason. I tested this by making my number private and calling into a flow with a TTS of my number being read back. It reads back a random number (that does not spell anonymous.) The number is not consistent, as I can dial from different numbers as private and TTS reads a different number each time.
I also tried pulling call.ani into a flow.ani variable, then doing an expression to change the call path based on whether flow.ani is a total of 10 characters, but that's not working either when using Right(call.ani, 10) to get the data, which is the only way to make sure we only get only the info we need on normal calls for data table purposes.
Is there any Pattern to the number you are getting for the Blocked numbers?
For us here, it comes through as a sip address with anonymous in the sip address.
But for you if it is a random number, does that random number contain the normal area code, does it have the international + at the front? is it a SIP or TEL number. These are all things you can check through either left/contains or ToPhoneNumber(Call.Ani) eg ToPhoneNumber(Call.Ani).IsSip
For a full list of what is available through the PhoneNumber Data type see:
Otherwise I would suggest talking to your Telco about the Dialplan that is setup, and see if they can force blocked numbers to follow a standard format, eg be an empty value, or to have the word anonymous in it etc.