Some help with interpreting WebSocket messages for transferred calls

Hi all,

Hoping for some assistance in interpreting the messages being received from the WebSocket topic v2.users.${id}.conversations.calls.
I'm writing an interface to monitor agent calls, and struggling to track calls correctly when an agent attempts to transfer a call to another agent.
Below is three messages from the topic that have been received when an agent transfers a call, and in this case the transferee has not answered.
The status of my monitoring widget needs to understand and show that a call is being transferred, then go back to ordinary active call if the destination agent does not answer.

I'm struggling to find the correct combination of attributes present in the messages to be able to visualise that process, hoping someone can help.

I have filtered the message participants array to just 'agent' ones, as I'm not interested in IVR etc at this point. Actual IDs of things replaced with filler.

**Message 1:**
[
  {
      "muted": false,
      "confined": false,
      "recording": false,
      "recordingState": "none",
      "securePause": false,
      "consultParticipantId": "aaaaaaaaaaaaaaaaa",
      "id": "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
      "address": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "connectedTime": "2023-06-20T03:15:06.989Z",
      "purpose": "agent",
      "state": "connected",
      "initialState": "alerting",
      "direction": "inbound",
      "held": false,
      "wrapupRequired": true,
      "wrapupPrompt": "timeout",
      "user": {
          "id": "bbbbbbbbbbbbbbbbbbbbbb"
      },
      "queue": {
          "id": "ccccccccccccccccccccccccc"
      },
      "attributes": {
          "consultInitiator": "true"
      },
      "wrapupTimeoutMs": 120000,
      "alertingTimeoutMs": 20000,
      "provider": "Edge",
      "peer": "eeeeeeeeeeeeeeeeeeeeeeeeee",
      "mediaRoles": [
          "full"
      ]
  },
  {
      "muted": false,
      "confined": false,
      "recording": false,
      "recordingState": "none",
      "securePause": false,
      "consultParticipantId": "aaaaaaaaaaaaaaaaa",
      "id": "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj",
      "address": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "purpose": "agent",
      "state": "alerting",
      "initialState": "alerting",
      "direction": "inbound",
      "held": false,
      "wrapupRequired": false,
      "wrapupPrompt": "timeout",
      "user": {
          "id": "dddddddddddddddddddddddd"
      },
      "queue": {
          "id": "ccccccccccccccccccccccccc"
      },
      "attributes": {},
      "wrapupTimeoutMs": 120000,
      "alertingTimeoutMs": 20000,
      "provider": "Edge",
      "peer": "hhhhhhhhhhhhhhhhhhhhhh",
      "mediaRoles": [
          "full"
      ]
  }
]

**Message 2:**
[
  {
      "muted": false,
      "confined": false,
      "recording": false,
      "recordingState": "none",
      "securePause": false,
      "consultParticipantId": "ffffffffffffffffffffffffffffffffff",
      "id": "kkkkkkkkkkkkkkkkkkkkkkkkkkk",
      "address": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "connectedTime": "2023-06-20T03:14:11.684Z",
      "purpose": "agent",
      "state": "connected",
      "initialState": "alerting",
      "direction": "inbound",
      "held": false,
      "wrapupRequired": true,
      "wrapupPrompt": "timeout",
      "user": {
          "id": "dddddddddddddddddddddddd"
      },
      "queue": {
          "id": "ccccccccccccccccccccccccc"
      },
      "attributes": {
          "consultInitiator": "true"
      },
      "wrapupTimeoutMs": 120000,
      "alertingTimeoutMs": 20000,
      "provider": "Edge",
      "peer": "nnnnnnnnnnnnnnnnnnnnnn",
      "mediaRoles": [
          "full"
      ]
  },
  {
      "muted": false,
      "confined": false,
      "recording": false,
      "recordingState": "none",
      "securePause": false,
      "consultParticipantId": "ffffffffffffffffffffffffffffffffff",
      "id": "lllllllllllllllllllllllllllllllllllll",
      "address": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "connectedTime": "2023-06-20T03:15:25.995Z",
      "purpose": "agent",
      "state": "connected",
      "initialState": "alerting",
      "direction": "inbound",
      "held": false,
      "wrapupRequired": true,
      "wrapupPrompt": "timeout",
      "user": {
          "id": "gggggggggggggggggggggg"
      },
      "queue": {
          "id": "ccccccccccccccccccccccccc"
      },
      "attributes": {},
      "wrapupTimeoutMs": 120000,
      "alertingTimeoutMs": 20000,
      "provider": "Edge",
      "peer": "oooooooooooooooo",
      "mediaRoles": [
          "full"
      ]
  }
]

**Message 3:**
[
  {
      "muted": false,
      "confined": false,
      "recording": false,
      "recordingState": "none",
      "securePause": false,
      "consultParticipantId": "aaaaaaaaaaaaaaaaa",
      "id": "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
      "address": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "connectedTime": "2023-06-20T03:15:06.989Z",
      "purpose": "agent",
      "state": "connected",
      "initialState": "alerting",
      "direction": "inbound",
      "held": false,
      "wrapupRequired": true,
      "wrapupPrompt": "timeout",
      "user": {
          "id": "bbbbbbbbbbbbbbbbbbbbbb"
      },
      "queue": {
          "id": "ccccccccccccccccccccccccc"
      },
      "attributes": {
          "consultInitiator": "true"
      },
      "wrapupTimeoutMs": 120000,
      "alertingTimeoutMs": 20000,
      "provider": "Edge",
      "peer": "eeeeeeeeeeeeeeeeeeeeeeeeee",
      "mediaRoles": [
          "full"
      ]
  },
  {
      "muted": false,
      "confined": false,
      "recording": false,
      "recordingState": "none",
      "securePause": false,
      "consultParticipantId": "aaaaaaaaaaaaaaaaa",
      "id": "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj",
      "address": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "endTime": "2023-06-20T03:15:52.285Z",
      "purpose": "agent",
      "state": "disconnected",
      "initialState": "alerting",
      "direction": "inbound",
      "disconnectType": "transfer.noanswer",
      "held": false,
      "wrapupRequired": false,
      "wrapupPrompt": "timeout",
      "user": {
          "id": "dddddddddddddddddddddddd"
      },
      "queue": {
          "id": "ccccccccccccccccccccccccc"
      },
      "attributes": {},
      "wrapupTimeoutMs": 120000,
      "alertingTimeoutMs": 20000,
      "provider": "Edge",
      "peer": "hhhhhhhhhhhhhhhhhhhhhh",
      "mediaRoles": [
          "full"
      ]
  }
]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.