Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Working with incoming SIP Headers from outside

    Posted 02-15-2024 11:37

    Hi All again,

    I'm working with SIP Headers in incomnig call from external application and I create this flow

    I want to get UserCode in a SIP Header, in this case X-Usercode. I use "Get SIP headers" to get this headers and after that I want to PLay the user Code to the caller, but I can play only the User Code. It's mean. I use this:

    But I always listen Your User code is: "X-Usercode 111111"

    Are there any way to reproduce only the code 111111. I just try another nodes to extract de code but I don't have success.

    Any can help me with this?

    Best regards,


    #Integrations
    #SIP/VolP
    #Telephony

    ------------------------------
    Sergio Serrano
    Other
    Verbio Technologies SL
    ------------------------------


  • 2.  RE: Working with incoming SIP Headers from outside

    Posted 02-15-2024 14:27

    Hi Sergio,

    One time ago I needed it and had to use the User-To-User. Custom fields were very well in Genesys Engage/on-premise but this a new feature in Genesys cloud: https://help.mypurecloud.com/releasenote/october-25-2023/, GREAT!!

    Can you test data in API Genesys, if available through endpoint Genesys Cloud, Architect will see it too.

    https://developer.genesys.cloud/platform/preview-apis#get-api-v2-telephony-sipmessages-conversations--conversationId-

    https://developer.genesys.cloud/platform/preview-apis#get-api-v2-telephony-sipmessages-conversations--conversationId--headers

    At,



    ------------------------------
    Breno Canyggia Ferreira Marreco
    https://www.linkedin.com/in/brenocfm-40b62182/
    ------------------------------



  • 3.  RE: Working with incoming SIP Headers from outside

    Posted 02-16-2024 03:49

    Thanks Breno,

     I was reviewing user-to-user but I didn't consider it because I have the information in the header and it can be recovered from Architect with the Get SIP Headers. The problem is probably because I'm new in Genesys Cloud, there is no way to extract information for JSON Object. I tried recommendation from Vaun, but it doesn't work.

    I can't see any API to manage JSON also.

    If you have any other recommendations, I will investigate.

    Best regards,



    ------------------------------
    Sergio Serrano
    Other
    Verbio Technologies SL
    ------------------------------



  • 4.  RE: Working with incoming SIP Headers from outside

    Posted 02-15-2024 18:29

    You maybe able to do something like:

    ToString(GetJsonObjectProperty(Task.Usercode, "X-Usercode"))



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 5.  RE: Working with incoming SIP Headers from outside

    Posted 02-19-2024 03:25

    Thanks Vaun,

     but this didn't work. 

    Any other Idea. I suppose it must be any way to process this, but I can found in documentation resources or in the community threads.

    Best Regards,



    ------------------------------
    Sergio Serrano
    Other
    Verbio Technologies SL
    ------------------------------



  • 6.  RE: Working with incoming SIP Headers from outside

    Posted 02-20-2024 14:42

    Hi Sergio

    As discussed separately offline, try this in your play audio:

    ToString(GetJsonObjectProperty(ToJson(Task.UserCode), "X-UserCode"))

    There's probably another way but the "issue" here is that the response from the Get SIP Headers goes into a collection.  So we first need to turn that into a "regular" JSON format (ToJson).  If X-UserCode has other items in it's array you'll need to add the index position there like:

    ToString(GetJsonObjectProperty(ToJson(Task.UserCode), "X-UserCode")[0])



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 7.  RE: Working with incoming SIP Headers from outside

    Posted 02-21-2024 04:40

    Hi Vaun,

        it works, thanks so much. Your explanation was very clear and I did easily.

    Best Regards,



    ------------------------------
    Sergio Serrano
    Other
    Verbio Technologies SL
    ------------------------------



Need Help finding something?

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