Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Regex External trunk Address Transformation

    Posted 14 days ago

    Hi,

    I'd like to transform called address on outbound calls using regex on the external trunk configuration.

    If there is +39 in front of the number, I need to delete it.

    After that, if the phone number is longer than 6 characters, I need to put "0" in front of the number.

    I configured the regex:

    ^(sip:|tel:|sip[s]:)(\+39)(.*)      $1$3   --> to delete the +39, it works correctly

    ^(sip:|tel:|sip[s]:)(\d{6,})$        $1\x30$2  --> to add 0 (zero), but it doesn't work.

    Called +393405438365 or 3405438365 the call comes out as: tel:3405438365  --> KO

    Called 3456 or +393456 the call comes out as: tel:3456   --> OK

    Using regex101.com, It seems to be working fine, but on GenesysCloud doesn't work.

    Can you please help me to configure it?

    Kind Regards,

    Daniele


    #ArchitectureandDesign
    #Implementation
    #Outbound
    #SIP/VoIP
    #Telephony

    ------------------------------
    Daniele Di Giovanna
    Senior Consultant
    ------------------------------


  • 2.  RE: Regex External trunk Address Transformation

    Posted 14 days ago

    Change format to ${1}0${2}



    ------------------------------
    Simon Brown
    Mr
    ------------------------------



  • 3.  RE: Regex External trunk Address Transformation

    Posted 14 days ago

    Hi Simon,

    I tried but it doesn't work.

    It seems that the regex condition is not recognized.



    ------------------------------
    Daniele Di Giovanna
    Senior Consultant
    ------------------------------



  • 4.  RE: Regex External trunk Address Transformation

    Posted 12 days ago

    Hi Daniele.

    I happened to notice that none of the examples in the Genesys Cloud documentation (e.g. here and here) use "\d" to represent a digit. I wonder if the regex engine doesn't support "\d"?

    Have you tried using "[0-9]" (or even ".") instead of "\d", to see if that solves the problem?

    Nick.



    ------------------------------
    Nick Tait
    Genesys Consultant
    ------------------------------



  • 5.  RE: Regex External trunk Address Transformation

    Posted 11 days ago

    Hi Nick,

    same problem.

    On regex101.com all solutions work correctly but not on Genesys.

    I can't find a solution.

    Kind Regards,

    Daniele



    ------------------------------
    Daniele Di Giovanna
    Senior Consultant
    ------------------------------



  • 6.  RE: Regex External trunk Address Transformation

    Posted 11 days ago

    Hi Daniele, you may need to set some parts as optional, so you always get a match.
    I think these expressions will work for you:

    1. ^(sip[s]?:|tel:)?(\+)?(39)(\d+)(@.*)?  with format $1$4$5
    2. ^(sip[s]?:|tel:)?(\+)?(\d{6,})(@.*)? with format $1\x30$3$4


    ------------------------------
    Marco Villaseñor
    Interastar
    ------------------------------



  • 7.  RE: Regex External trunk Address Transformation

    Posted 11 days ago

    Here are some that we use:

    US 10 or 11 digits

    \b[0-9]{10,11}\b

    \d[10,11]

    [(]?\d{3}[-.)]?[ ]?\d{3}[-.]?\d{4}\b

    [(]?\d{3}[)]?\s?-?\s?\d{3}\s?-?\s?\d{4}

    Internataional

    ^\s*(?:\+?(\d{1,3}))?([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$

    ^\s*((0044[ ]?|0)[ ]?20[ ]?[7,8]{1}?[ ]?[1-9]{1}[0-9]{2}[ ]?[0-9]{4})|((0044[ ]?|0[1-8]{1})[0-9]{1,2}[ ]?[1-9]{1}[0-9]{2}[ ]?([0-9]{6}|[0-9]{5}|[0-9]{4}))|(0[1-8]{1}[0-9]{3}[ ]?[1-9]{1}[0-9]{2}[ ]?[0-9]{2,3})|(0800[ ]?([1-9]{3}[ ]?[1-9]{4}|[1-9]{6}|[1-9]{4}))|(09[0-9]{1}[ ]?[0-9]{1}[ ]?([1-9]{4}|[1-9]{6}|[1-9]{3}[ ]?[1-9]{4}))\s*$

    ^([+]\d{3})?\s?(\d{3}\s?){2}\d{3}$

    Personally, I prefer regexr.com and search the community.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 8.  RE: Regex External trunk Address Transformation
    Best Answer

    Posted 9 days ago

    Hi Daniele.

    It sounds like you believe that it isn't working the way it is supposed do (i.e. not working as documented). In that case I'd suggest raising a support case and get Genesys Support to work with you to troubleshoot the specific issue that you are having?

    Nick.



    ------------------------------
    Nick Tait
    Genesys Consultant
    ------------------------------



Need Help finding something?

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