Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  POST /api/v2/conversations/calls creating interactions with a single participant

    Posted 04-09-2025 11:17

    Hi everyone!

    We're having a strange intermittent issue with the Conversations API and I'm hoping to get some guidance on it. The Conversations API returns a 400 if a participant is not defined in the request body of POST /api/v2/conversations/calls. However, every so often we are having an issue where it will return a 202, the call will be placed in the UI, but it never starts ringing.

    The strange part is the agent UI shows the correct DNIS, but if we look at the call from the Conversations API and from the Interactions Workspace, it only shows to have only ever had a single participant on it. Here's a redacted JSON example, as well as a screenshot

    This screenshot shows the call that was placed on the agent's UI, with the phone number showing in the title bar, but no external participant is actually added
    This screenshot shows that no external participant was ever added
    {
      "id": "<REDACTED>",
      "startTime": "2025-04-08T14:37:26.529Z",
      "endTime": "2025-04-08T14:37:52.715Z",
      "address": "sip:<REDACTED>",
      "participants": [
        {
          "id": "<REDACTED>",
          "startTime": "2025-04-08T14:37:26.529Z",
          "endTime": "2025-04-08T14:37:52.715Z",
          "name": "Internal Agent Name",
          "userUri": "/api/v2/users/<REDACTED>",
          "userId": "<REDACTED>",
          "queueId": "<REDACTED>",
          "queueName": "<REDACTED>",
          "purpose": "agent",
          "participantType": "Internal",
          "address": "sip:<REDACTED>",
          "ani": "sip:<REDACTED>",
          "dnis": "tel:+1<REDACTED>",
          "wrapupRequired": false,
          "wrapupPrompt": "agentRequested",
          "wrapupTimeoutMs": 30000,
          "mediaRoles": [
            "full"
          ],
          "attributes": {},
          "calls": [
            {
              "state": "terminated",
              "initialState": "contacting",
              "id": "<REDACTED>",
              "direction": "outbound",
              "recording": false,
              "recordingState": "none",
              "muted": false,
              "confined": false,
              "held": false,
              "securePause": false,
              "segments": [
                {
                  "startTime": "2025-04-08T14:37:26.529Z",
                  "endTime": "2025-04-08T14:37:52.715Z",
                  "type": "Contacting",
                  "howEnded": "Disconnect",
                  "disconnectType": "client"
                }
              ],
              "disconnectType": "client",
              "disconnectedTime": "2025-04-08T14:37:52.715Z",
              "disconnectReasons": [],
              "provider": "Edge",
              "self": {
                "nameRaw": "",
                "addressNormalized": "sip:<REDACTED>",
                "addressRaw": "<REDACTED>",
                "addressDisplayable": "unavailable"
              },
              "other": {
                "name": "Plano TX",
                "nameRaw": "",
                "addressNormalized": "tel:+1<REDACTED>",
                "addressRaw": "tel:+1<REDACTED>",
                "addressDisplayable": "unavailable"
              },
              "afterCallWork": {
                "startTime": "2025-04-08T14:37:52.715Z",
                "endTime": "2025-04-08T14:37:52.715Z",
                "state": "skipped"
              },
              "afterCallWorkRequired": false,
              "queueMediaSettings": {
                "alertingTimeoutSeconds": 25
              }
            }
          ],
          "callbacks": [],
          "chats": [],
          "cobrowsesessions": [],
          "emails": [],
          "messages": [],
          "screenshares": [],
          "socialExpressions": [],
          "videos": [],
          "startAcwTime": "2025-04-08T14:37:52.715Z",
          "endAcwTime": "2025-04-08T14:37:52.715Z",
          "internalMessages": []
        }
      ],
      "recordingState": "NONE",
      "divisions": [
        {
          "division": {
            "id": "<REDACTED>",
            "selfUri": "/api/v2/authorization/divisions/<REDACTED>"
          },
          "entities": [
            {
              "id": "<REDACTED>",
              "selfUri": "/api/v2/users/<REDACTED>",
              "dateDivisionUpdated": "2025-04-08T14:37:26.679Z"
            },
            {
              "id": "<REDACTED>",
              "selfUri": "/api/v2/routing/queues/<REDACTED>",
              "dateDivisionUpdated": "2025-04-08T14:37:26.679Z"
            }
          ]
        }
      ],
      "recentTransfers": [],
      "securePause": false,
      "utilizationLabelId": "<REDACTED>",
      "selfUri": "/api/v2/conversations/<REDACTED>"
    }

    Could anyone give me some insight as to why this could be the case?


    #PlatformAPI

    ------------------------------
    Nate Reprogle
    ------------------------------


  • 2.  RE: POST /api/v2/conversations/calls creating interactions with a single participant

    Posted 04-09-2025 16:38

    I'm still looking for advice on this, to see if it's a misconfiguration on my end or something, but to "stop the bleed", we are initiating the call, then checking the number of participants on the call. If there is only one participant (The user) then it will attempt to make a POST /api/v2/conversations/{conversationId}/participants request to force the second participant onto the call. If this still doesn't succeed after three attempts, it disconnects the call from the user. 

    I did open a ticket with Genesys, but I'm wondering if the community has any input as well



    ------------------------------
    Nate Reprogle
    ------------------------------



  • 3.  RE: POST /api/v2/conversations/calls creating interactions with a single participant
    Best Answer

    Posted 04-10-2025 04:12
    Edited by Nate Reprogle 04-10-2025 11:00

    Hi Nate,

    I've been there too and the solution was activating the 'Allow apps to place calls' option for the phone settings as below.



    ------------------------------
    Orhun Sahin
    Software Development Engineer
    ------------------------------



  • 4.  RE: POST /api/v2/conversations/calls creating interactions with a single participant

    Posted 04-10-2025 11:00

    Awesome, good to know. I'm wondering why the Conversations API even allows calls to be placed if this setting is off. The fact that it's hit or miss, and yet still returning 202's regardless, feels like a bug to me. 



    ------------------------------
    Nate Reprogle
    ------------------------------



  • 5.  RE: POST /api/v2/conversations/calls creating interactions with a single participant

    Posted 04-10-2025 12:14

    I agree that it should not even allow you to place the call if you don't have this option enabled, but that is how it is:)  If the problem persists with this option, I recommend submitting a ticket to Genesys care so that they can investigate and resolve any bugs.



    ------------------------------
    Orhun Sahin
    Software Development Engineer
    ------------------------------