Sign inGet started

Update a call

Update an active call resource. You can use this request to do additional actions:
  • You can use this request to hangup the call by setting status to completed
  • It can also be used to update the callFlow of the call. Commands of the new callFlow will be executed after the Patch.

CallFlowCommand

Check bellow the available commands when initiating an outbound call. In order to assess the options of each command, you may explore each command section.
Exemple de code
type: string
enum:
  - answer
  - hangup
  - playback
  - say
  - gather
  - record
  - bridge
  - pause
  - ringing
PATCH
/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}
Update a call
Corps de la requête
status
string
Possible values: completed
callFlow
array of object
Afficher les paramètres enfants
callFlow.command
string
Possible values: answer, hangup, playback, say, gather, record, bridge, pause, ringing
callFlow.options
object
Afficher les paramètres enfants
callFlow.conditions
array of object
Afficher les paramètres enfants
callFlow.conditions.variable
string
Possible values: keys, speech
callFlow.conditions.operator
string
Possible values: eq, ne, ==, !=, contains
callFlow.conditions.value
string
Corps de la réponse
id
string
obligatoire
channelId
string
obligatoire
from
string
obligatoire
to
string
obligatoire
originator
object
obligatoire
Afficher les attributs enfants
originator.contact
object
Afficher les attributs enfants
originator.contact.id
string
obligatoire
originator.contact.identifierKey
string
obligatoire
originator.contact.identifierValue
string
obligatoire
originator.number
object
obligatoire
Afficher les attributs enfants
originator.number.type
string
obligatoire
Possible values: pstn, sip, webrtc
originator.number.number
string
obligatoire
originator.number.anonymous
boolean
originator.number.callerIdName
string
originator.number.identity
string
originator.number.countryIsoCode
string
originator.number.pstnNumberType
string
receiver
object
obligatoire
Afficher les attributs enfants
receiver.contact
object
Afficher les attributs enfants
receiver.contact.id
string
obligatoire
receiver.contact.identifierKey
string
obligatoire
receiver.contact.identifierValue
string
obligatoire
receiver.number
object
obligatoire
Afficher les attributs enfants
receiver.number.type
string
obligatoire
Possible values: pstn, sip, webrtc
receiver.number.number
string
obligatoire
receiver.number.anonymous
boolean
receiver.number.callerIdName
string
receiver.number.identity
string
receiver.number.countryIsoCode
string
receiver.number.pstnNumberType
string
parentId
string
direction
string
obligatoire
Possible values: incoming, outgoing
status
string
obligatoire
Possible values: accepted, starting, ringing, ongoing, completed, busy, no-answer, failed, cancelled, scheduled
reason
string
type
string
obligatoire
Possible values: pstn, sip, webrtc
duration
integer
hangupCauseCode
integer
hangupSource
string
Possible values: callee, caller, api, timeout, media-timeout, none
hangupSipCode
string
createdAt
string
obligatoire
updatedAt
string
obligatoire
ringingAt
string
answeredAt
string
endedAt
string
scheduledFor
string
callFlow
object
Afficher les attributs enfants
callFlow.id
string
callFlow.commands
array of object
Afficher les attributs enfants
callFlow.commands.id
string
callFlow.commands.callId
string
callFlow.commands.callFlowId
string
callFlow.commands.status
string
callFlow.commands.command
string
callFlow.commands.conditions
array of object
Afficher les attributs enfants
callFlow.commands.conditions.variable
string
Possible values: keys, speech
callFlow.commands.conditions.operator
string
Possible values: eq, ne, ==, !=, contains
callFlow.commands.conditions.value
string
notification
object
Afficher les attributs enfants
notification.url
string
qualityInsights
object
Afficher les attributs enfants
qualityInsights.mos
string
qualityInsights.pdd
string
sipInsights
object
Afficher les attributs enfants
sipInsights.hangupSipCode
string
sipInsights.edgeRegion
string
sipInsights.providerName
string
sipInsights.userAgent
string
sipInsights.remoteSignallingIp
string
sipInsights.remoteMediaIp
string
amdResult
object
Afficher les attributs enfants
amdResult.result
string
Possible values: human, machine, noSpeech, beep, unknown
amdResult.speech
string
amdResult.locale
string
sipType
string
Possible values: elastic, byoc, forward
tags
array of string
Tags to associate with the call. Tags are converted to lower case and tags that do not exist are automatically created. You can view your created tags in the UI. You can specify up to 10 tags per call.
Exemple de code
curl -X PATCH 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Example 1: Update a call by answering

Exemple de code
curl -X PATCH "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{channelId}" \
     -H "Authorization: AccessKey YOUR_SECRET_TOKEN"

Example 2: Update a call by sending ringing, pause for 2 seconds, answer and play an announcement

Exemple de code
curl -X PATCH "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{channelId}" \
     -H "Authorization: AccessKey YOUR_SECRET_TOKEN"