Skip to main content

Sync

This event is only sent when the ongoing call metadata has changed.

{
"type": "DIALER.SYNC",
"payload": {
"metadata": "Metadata!"
}
}

Usage

metadata is a payload that contains all the ongoing call information. It should be used to hydrate your UI and display useful information to your agent, like:

  • Who's calling
  • On which line
  • Who are the participants
  • Is the call on hold
  • Is the recording enabled
  • etc ...
danger

You should NOT rely on the metadata to determine the status of the call. You have a dedicated event for that called DIALER.CALL_STATUS.

Reference

  • metadata:
    • id: The call DB id.
    • callUuid: The unique identifier of the call.
    • line: The line used for the call.
      • id: The unique identifier of the line.
      • name: The name of the line.
      • number: The number of the line.
      • normalized: The normalized number of the line.
      • country_iso: The country ISO code of the line.
    • from: The caller of the call (it can be either the external or the agent themselves).
    • to: The callee of the call (it can be either the external or the agent themselves).
    • canControlRecording: Whether the agent can control the recording of the call or not. (If this is false, the record button should be disabled).
    • recordingState: The current state of the recording of the call. it can be either idle, recording or paused.
    • direction: The direction of the call. It can be either incoming or outgoing.
    • me: The current user participant (or the coach if the call is a coaching call).
      • user: The current user
      • legId: The leg identifier of the participant.
      • isHeld: Whether the participant is on hold or not.
      • state: The current state of the participant. It can be either answering, ringing, ended.
    • activeParticipant: Participant which we are talking with.
      • external: The user in case the call is external.
      • user: The user if the call is internal.
      • legId: The leg identifier of the participant.
      • isHeld: Whether the participant is on hold or not.
      • state: The current state of the participant. It can be either answering, ringing, ended.
    • inactiveParticipant: (This property is not present during regular call flows) Participant which is currently on hold during Warm Transfers or Concurrent Calls.
      • external: The user if the call is external.
      • user: The user if call is internal.
      • legId: The leg identifier of the participant.
      • isHeld: Whether the participant is on hold or not.
      • state: The current state of the participant. It can be either answering, ringing, ended
    • participants: (This property is not present during regular call flows) An array of participants (excluding the current user) during Conference Calls. Each item of the array has the following fields:
      • external: The user if the call is external.
      • user: The user if call is internal.
      • legId: The leg identifier of the participant.
      • isHeld: Whether the participant is on hold or not.
      • state: The current state of the participant. It can be either answering, ringing, ended
    • coachParticipant: (This property is only present when the ongoing call is being coached) The participant which is coaching.
      • external: The user if the call is external.
      • user: The user if call is internal.
      • legId: The leg identifier of the participant.
      • isHeld: Whether the participant is on hold or not.
      • state: The current state of the participant. It can be either answering, ringing, ended
    • coacheeParticipant: (This property is only present during coaching calls) The participant which is being coached.
      • external: The user if the call is external.
      • user: The user if call is internal.
      • legId: The leg identifier of the participant.
      • isHeld: Whether the participant is on hold or not.
      • state: The current state of the participant. It can be either answering, ringing, ended

Example

{
"type": "DIALER.SYNC",
"payload": {
"metadata": {
"id": 2855812,
"callUuid": "CAf7fba0c03111b487f96bcaa33c617f27",
"line": {
"id": 101,
"name": "Line #",
"number": "3228080380",
"normalized": "+32 2 808 03 80",
"country_iso": "BE"
},
"from": {
"phoneNumber": "3228088823"
},
"to": {
"id": 1,
"fullName": "John Doe",
"avatar": "https://media-web.aircall-staging.com/companies/509/users/1/photo/1660640685190/924"
},
"canControlRecording": false,
"recordingState": "idle",
"me": {
"user": {
"id": 1,
"fullName": "John Doe",
"avatar": "https://media-web.aircall-staging.com/companies/509/users/1/photo/1660640685190/924"
},
"legId": "CAa2a8c99cfa7894ac7a26ca7d0a138bda",
"state": "answering",
"isHeld": false
},
"activeParticipant": {
"external": {
"phoneNumber": "3228088823"
},
"legId": "CAf7fba0c03111b487f96bcaa33c617f27",
"state": "answering",
"isHeld": false
},
"inactiveParticipant": {
"external": {
"id": 1,
"fullName": "John Doe",
"avatar": "https://media-web.aircall-staging.com/companies/509/users/1/photo/1660640685190/924"
},
"legId": "CAf7fba0c03111b487f96bcaa33c617f27",
"state": "answering",
"isHeld": true
},
"direction": "incoming"
}
}
}