Skip to main content

Bridge Complete

If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call.

Note: if this webhook is sent, the Bridge Target Complete webhook is NOT sent.

info

This callback is also sent if any problem occurs that prevents the calls to be bridged.

Request Parameters

PropertyDescription
eventTypeThe event type, value is bridgeComplete.
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.
accountIdThe user account associated with the call.
applicationIdThe id of the application associated with the call.
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. Either inbound or outbound. The direction of a call never changes.
callIdThe call id associated with the event.
callUrlThe URL of the call associated with the event.
enqueuedTime(optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format.
startTimeTime the call was started, in ISO 8601 format.
answerTimeTime the call was answered, in ISO 8601 format.
tagThe tag specified earlier in the call. If no tag was specified or it was previously cleared, this field will not be present.
causeReason the bridge failed - busy, rejected, or unknown.
errorMessageText explaining the reason that caused the bridge to fail in case of errors.
errorIdBandwidth internal id that references the error event.

Expected Response

HTTP/1.1 200
Content-Type: application/xml; charset=utf-8

<Response>
<!-- BXML verbs to process in the call -->
</Response>

Examples

Completion of a Successful Bridge

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

{
"eventType" : "bridgeComplete",
"eventTime" : "2019-07-31T13:15:35.121Z",
"accountId" : "55555555",
"applicationId" : "7fc9698a-b04a-468b-9e8f-91238c0d0086",
"from" : "+15551112222",
"to" : "+15553334444",
"direction" : "outbound",
"callId" : "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"startTime" : "2019-07-31T13:13:34.859Z",
"answerTime" : "2019-07-31T13:13:40.644Z"
}

Completion of a Successful Bridge with Enqueued Time

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

{
"eventType" : "bridgeComplete",
"eventTime" : "2019-07-31T13:15:35.121Z",
"accountId" : "55555555",
"applicationId" : "7fc9698a-b04a-468b-9e8f-91238c0d0086",
"from" : "+15551112222",
"to" : "+15553334444",
"direction" : "outbound",
"callId" : "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"enqueuedTime" : "2019-07-31T13:13:30.374Z",
"startTime" : "2019-07-31T13:13:34.859Z",
"answerTime" : "2019-07-31T13:13:40.644Z"
}

Failed Bridge

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

{
"eventType" : "bridgeComplete",
"eventTime" : "2019-07-31T13:15:35.121Z",
"accountId" : "55555555",
"applicationId" : "7fc9698a-b04a-468b-9e8f-91238c0d0086",
"from" : "+15551112222",
"to" : "+15553334444",
"direction" : "outbound",
"callId" : "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d",
"transferCallerId" : "+15551115555",
"transferTo" : "+15556667777",
"startTime" : "2019-07-31T13:13:34.859Z",
"answerTime" : "2019-07-31T13:13:40.644Z",
"cause" : "busy",
"errorMessage" : "Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged with another call",
"errorId" : "4642074b-7b58-478b-96e4-3a60955c6765"
}