Real-Time Transcription Stopped
This event may be sent to the url specified when sending a <StopTranscription>
verb, or if the real-time transcription is stopped for another reason such as the call being hungup.
Request Parameters
Property | Description |
---|---|
accountId | The user account associated with the call. |
answerTime | Time the call was answered, in ISO 8601 format. |
applicationId | The id of the application associated with the call. |
callId | The call id associated with the event. |
callUrl | The URL of the call associated with the event. |
cause | The reason the transcription was stopped. This can be one of closed , connection-error , or error . |
direction | The direction of the call. Either inbound or outbound . The direction of a call never changes. |
enqueuedTime | (optional) If call queueing is enabled and this is an outbound call, this is the time the call was queued, in ISO 8601 format. Otherwise, this is omitted. |
errorMessage | (optional) If the cause value was anything other than closed , this will contain details about what went wrong. |
eventTime | The 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. |
eventType | The event type, value is realTimeTranscriptionStopped |
from | The provided identifier of the caller: can be a phone number in E.164 format (e.g. +15555555555) or one of Private , Restricted , Unavailable , or Anonymous . |
realTimeTranscription | Details about the real-time transcription that was stopped |
realTimeTranscription.duration | The duration of time the transcription was active |
realTimeTranscription.id | The unique id of this real-time transcription that was stopped |
realTimeTranscription.name | The name of this real-time transcription that was stopped |
realTimeTranscription.startTime | The approximate UTC date and time the transcription was started |
realTimeTranscription.tracks | The segments of the call that were transcribed, values will be one or both of inbound and outbound |
realTimeTranscription.destination | (optional) The destination URL to which the transcription was sent |
realTimeTranscription.stabilized | (optional) Whether transcription update events were sent to the specified destination only after they had become stable. |
startTime | Time the call was started, in ISO 8601 format. |
to | The phone number that received the call, in E.164 format (e.g. +15555555555). |
tag | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. |
Possible cause
Values
Value | Meaning |
---|---|
closed | The real-time transcription was closed intentionally, either because a <StopTranscription> request was sent, or the call ended |
connection-error | There was a problem communicating with the destination supplied in the <StartTranscription> request. For example connecting to the websocket timed out, or the websocket closed abnormally, etc. |
error | There was an internal error other than a problem communicating with the destination |
Expected Response
HTTP/1.1 204
Examples
Real-Time Transcription Stopped Event with Enqueued Time
POST http://myapp.example/realTimeTranscriptionEvents
Content-Type: application/json
{
"accountId" : "55555555",
"answerTime" : "2022-06-30T18:55:02.080Z",
"applicationId" : "7fc9698a-b04a-468b-9e8f-91238c0d0086",
"callId" : "c-95ac912f-68aacdd7-4a8e-4223-a7fd-020e02fa6bf2",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac912f-68aacdd7-4a8e-4223-a7fd-020e02fa6bf2",
"cause" : "closed",
"direction" : "outbound",
"enqueuedTime" : "2022-06-30T18:54:59.172Z",
"eventTime" : "2022-06-30T18:55:02.489Z",
"eventType" : "realTimeTranscriptionStopped",
"from" : "+15551112222",
"transcription" : {
"duration" : "PT1M52.217257456S",
"id" : "t-95ac90b3-e9cd80fa-fca7-4d12-9109-2990afe4d8c5",
"name" : "example_real-time_transcription",
"startTime" : "2022-06-30T18:55:02.489Z",
"tracks" : ["inbound", "outbound"]
},
"startTime" : "2022-06-30T18:54:59.175Z",
"to" : "+15553334444"
}
Real-Time Transcription Stopped Event with Enqueued Time and Destination
POST http://myapp.example/realTimeTranscriptionEvents
Content-Type: application/json
{
"accountId" : "55555555",
"answerTime" : "2022-06-30T18:55:02.080Z",
"applicationId" : "7fc9698a-b04a-468b-9e8f-91238c0d0086",
"callId" : "c-95ac912f-68aacdd7-4a8e-4223-a7fd-020e02fa6bf2",
"callUrl" : "https://voice.bandwidth.com/api/v2/accounts/55555555/calls/c-95ac912f-68aacdd7-4a8e-4223-a7fd-020e02fa6bf2",
"cause" : "closed",
"direction" : "outbound",
"enqueuedTime" : "2022-06-30T18:54:59.172Z",
"eventTime" : "2022-06-30T18:55:02.489Z",
"eventType" : "realTimeTranscriptionStopped",
"from" : "+15551112222",
"transcription" : {
"duration" : "PT1M52.217257456S",
"id" : "t-95ac90b3-e9cd80fa-fca7-4d12-9109-2990afe4d8c5",
"name" : "example_real-time_transcription",
"startTime" : "2022-06-30T18:55:02.489Z",
"tracks" : ["inbound", "outbound"],
"destination" : "wss://websocket.myapp.example",
"stabilized" : "true"
},
"startTime" : "2022-06-30T18:54:59.175Z",
"to" : "+15553334444"
}