Skip to main content

Transfer Disconnect

This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg.

The cause for a transferDisconnect event on a call can be:

  • hangup: one party hung up the call, a <Hangup> verb was executed, or there was no more BXML to execute; it indicates that the call ended normally.
  • busy: the callee was busy.
  • timeout: the call wasn't answered before the callTimeout was reached.
  • cancel: the call was cancelled by its originator while it was ringing.
  • rejected: the call was rejected by the callee.
  • callback-error: a BXML callback couldn't be delivered to your callback server.
  • invalid-bxml: invalid BXML was returned in response to a callback.
  • application-error: an unsupported action was tried on the call, e.g. trying to play a .ogg audio.
  • account-limit: the account rate limits were reached.
  • node-capacity-exceeded: the system maximum capacity was reached.
  • error: some error not described in any of the other causes happened on the call.
  • unknown: some unknown error happened on the call.
caution

This list is not exhaustive and other values can appear in the future.

Request Parameters

PropertyDescription
eventTypeThe event type, value is transferDisconnect.
eventTimeThe approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.
fromThe provided identifier string of the caller used in the from field of the original call.
toThe phone number user in the to field of the original call, in E.164 format (e.g. +15555555555).
directionThe direction of the call. Always outbound for this event.
callIdThe call id associated with the event.
parentCallIdThe call id of the original call leg that contained the <Transfer> tag.
callUrlThe URL of the call associated with the event.
tagThe tag specified earlier in the call. If no tag was specified or it was previously cleared, this field will not be present.
enqueuedTime(optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format.
startTimeTime the transferred leg was started, in ISO 8601 format.
answerTime(optional) Time the transferred leg was answered, in ISO 8601 format.
endTimeTime the transferred leg ended, in ISO 8601 format.
transferCallerIdThe phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555) even if privacy is set to true.
privacy(optional) Hide the calling number. The transferCallerDisplayName field can be used to customize the displayed name.
transferCallerDisplayName(optional) The caller display name to use when the call is transferred. May not exceed 256 characters nor contain control characters such as new lines. If privacy is true, only the following values are valid: Restricted, Anonymous, Private, or Unavailable.
transferToThe phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555).
causeReason the transferred leg ended. See above for possible values.
errorMessageText explaining the reason that caused the transferred leg to be ended in case of errors.
errorIdBandwidth internal id that references the error event.

Expected Response

HTTP/1.1 204

Examples

Successful Transfer Disconnected

POST http://yourUrl.example/transferDisconnect
Content-Type: application/json

{
"eventType" : "transferDisconnect",
"eventTime" : "2019-12-27T19:19:28.003Z",
"from" : "+15551112222",
"to" : "+15553334444",
"direction" : "outbound",
"callId" : "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"parentCallId" : "c-95ac8d6e-2c7ae496-7558-47a4-b291-4f02a3ca6942",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"transferCallerId" : "+15551115555",
"transferTo" : "+15556667777",
"startTime" : "2019-12-27T19:18:20.721Z",
"answerTime" : "2019-12-27T19:18:23.320Z",
"endTime" : "2019-12-27T19:19:27.987Z",
"cause" : "hangup"
}

Successful Transfer Disconnected with Enqueued Time

POST http://yourUrl.example/transferDisconnect
Content-Type: application/json

{
"eventType" : "transferDisconnect",
"eventTime" : "2019-12-27T19:19:28.003Z",
"from" : "+15551112222",
"to" : "+15553334444",
"direction" : "outbound",
"callId" : "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"parentCallId" : "c-95ac8d6e-2c7ae496-7558-47a4-b291-4f02a3ca6942",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"transferCallerId" : "+15551115555",
"transferTo" : "+15556667777",
"enqueuedTime" : "2019-12-27T19:18:10.390Z",
"startTime" : "2019-12-27T19:18:20.721Z",
"answerTime" : "2019-12-27T19:18:23.320Z",
"endTime" : "2019-12-27T19:19:27.987Z",
"cause" : "hangup"
}

Failed Transfer to Busy Number Disconnected

POST http://yourUrl.example/transferDisconnect
Content-Type: application/json

{
"eventType" : "transferDisconnect",
"eventTime" : "2019-12-27T19:24:00.020Z",
"from" : "+15551112222",
"to" : "+15553334444",
"direction" : "outbound",
"callId" : "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"parentCallId" : "c-95ac8d6e-2c7ae496-7558-47a4-b291-4f02a3ca6942",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"transferCallerId" : "+15551115555",
"transferTo" : "+15556667777",
"startTime" : "2019-12-27T19:23:38.685Z",
"endTime" : "2019-12-27T19:23:39.465Z",
"cause" : "busy",
"errorMessage" : "Callee is busy",
"errorId" : "4642074b-7b58-478b-96e4-3a60955c6765"
}