Is there a variable that is exposed in inbound flows that tells if the callers ANI is a mobile or landline number?
Or would I have to use a third party API and use a data action to see if the ANI is a mobile or landline number?
Hi,
I'm doing this check in my entrance flow too. I don't use an API or built in variable. I use ToPhoneNumber function and check area code. Something like this may work for you;
ToPhoneNumber(Call.ANI).subscriberNumber
Let's say your phone number is +90 531 317 77 88, it returns 5313177788. If you call from a landline, let's say +90 212 310 40 00, it will return 2123104000. You can use a decision block to determine if this is a mobile phone number or a landline.
For example, in Turkey all mobile phones start with 5 and no landline starts with 5. Which means I can use something like that in decision block;
Substring(ToPhoneNumber(Call.ANI).subscriberNumber, 0, 1) == "5"
If this returns true, that means it is a mobile phone number.
You can use this if you are only checking for one country but if you take into account calls from all over the world, this sample can't be used properly.
You can see detailed info about phone number datatype and methods in here;
Hope this helps, regards.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.