Genesys Cloud - Main

 View Only


Discussion Thread View
  • 1.  Restrict SMS from non-US phone numbers

    Posted 14 days ago

    Hello everyone. We are a national crisis hotline for the United States. We have started to receive text message interactions from non-US phone numbers.  I'm wondering if anyone has a suggestion for how to detect the contact is coming from a non-US phone number and send prevent it from completing the incoming flow?

    Thanks


    #ArchitectureandDesign
    #DigitalChannels
    #Unsure/Other

    ------------------------------
    Marty Hand
    National Domestic Violence Hotline
    ------------------------------


  • 2.  RE: Restrict SMS from non-US phone numbers

    Posted 14 days ago

    Hi Marty,

    The Architect variable Message.Message.senderAddress will give you the number of the phone. In a lot of the world this is relatively straightforward such as me in the UK would be checking the first 3 characters = "+44" or go to "+447" as we have a specific mobile prefix. As the USA is part of the North American Numbering Plan "+1" is too broad. I'd suggest a data table with all the US area code prefixes to check against.

    You could also try the Message.Message.senderAddressInfo but in the UK I'm just getting the same as the sender address. A quick test is to create an Architect flow where you store the variables in Set participant Data and then check they show as expected.

    So a Data Table lookup with the input as substring(Message.Message.senderAddress,0,5) and the Data Table records with entries such as +1907 for Alaska or +1808 for Hawaii could work for standard numbers. If a match is found continue otherwise disconnect or reply with a message then disconnect. I'd also suggest a flow outcome so you can quickly track and resolve any issues.

    I think there was a very old Community Q&A about location based routing which is essentially the same logic.

    Anyone with more knowledge of US numbering please join in. I've not added short codes as I would not expect those to be used for this type of traffic.



    ------------------------------
    Richard Chandler
    Connect
    ------------------------------



  • 3.  RE: Restrict SMS from non-US phone numbers

    Posted 14 days ago

    Thank you, Richard.  That was one idea I had. I was hoping for something a bit less manual since we will have to keep up with any new area codes that get added.  But I think that will be a workable solution.

    Much appreciated.



    ------------------------------
    Marty Hand
    National Domestic Violence Hotline
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources