This API document describes the VoiceCallSession API, which enables integration with CCaaS platforms. It allows triggering Cresta Agent Desktop events such as Call Start, Call Hold, Call Unhold, and Call End.
This API document describes the VoiceCallSession API, which enables integration with CCaaS platforms. It allows triggering Cresta Agent Desktop events such as Call Start, Call Hold, Call Unhold, and Call End.
curl -i -X POST \
'https://{api-domain}.cresta.com/v1/voicecallsession/streamCallSession' \
-H 'Content-Type: application/json' \
-d '{
"streamingConfig": {
"profile": "string",
"audioMetadata": {
"sampleRateHertz": 0,
"encoding": "AUDIO_ENCODING_UNSPECIFIED"
},
"channelType": "CHANNEL_TYPE_UNSPECIFIED",
"platformCallId": "string"
},
"audioContent": {
"audioContent": "string",
"participant": {
"role": "ROLE_UNSPECIFIED",
"user": "string",
"platformAgentId": "string",
"externalUserId": "string"
}
},
"sessionEvent": {
"eventType": "EVENT_TYPE_UNSPECIFIED",
"platformCallId": "string",
"platformMasterCallId": "string",
"participants": [
{
"role": "ROLE_UNSPECIFIED",
"user": "string",
"platformAgentId": "string",
"externalUserId": "string"
}
],
"platformTime": "2019-08-24T14:15:22Z",
"payload": {},
"closeActiveCalls": true
},
"sequenceId": "string"
}'
A successful response.(streaming responses)
Response of [VoiceCallSessionService.StreamCallSession][].
The Status
type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status
message contains three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
{ "result": { "sessionStatus": { … }, "sequenceId": "string", "conversationName": "string" }, "error": { "code": 0, "message": "string", "details": [ … ] } }
(streaming inputs)
The audio stream event. This only applies to StreamCallSessionAudio API.
curl -i -X POST \
'https://{api-domain}.cresta.com/v1/voicecallsession/streamCallSessionAudio' \
-H 'Content-Type: application/json' \
-d '{
"streamingConfig": {
"profile": "string",
"audioMetadata": {
"sampleRateHertz": 0,
"encoding": "AUDIO_ENCODING_UNSPECIFIED"
},
"channelType": "CHANNEL_TYPE_UNSPECIFIED",
"platformCallId": "string"
},
"audioContent": {
"audioContent": "string",
"participant": {
"role": "ROLE_UNSPECIFIED",
"user": "string",
"platformAgentId": "string",
"externalUserId": "string"
}
},
"audioEvent": {
"eventType": "EVENT_TYPE_UNSPECIFIED",
"pauseDuration": "string"
},
"sequenceId": "string"
}'
A successful response.(streaming responses)
Response of [VoiceCallSessionService.StreamCallSessionAudio][].
The Status
type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status
message contains three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
{ "result": { "sessionStatus": { … }, "sequenceId": "string", "conversationName": "string" }, "error": { "code": 0, "message": "string", "details": [ … ] } }
The audio streaming mode, which indicates where the audio is streamed from.
curl -i -X POST \
'https://{api-domain}.cresta.com/v1/voicecallsession/{profile}/sessionEvent:process' \
-H 'Content-Type: application/json' \
-d '{
"sessionEvent": {
"eventType": "EVENT_TYPE_UNSPECIFIED",
"platformCallId": "string",
"platformMasterCallId": "string",
"participants": [
{
"role": "ROLE_UNSPECIFIED",
"user": "string",
"platformAgentId": "string",
"externalUserId": "string"
}
],
"platformTime": "2019-08-24T14:15:22Z",
"payload": {},
"closeActiveCalls": true
},
"audioStreamingMode": "AUDIO_STREAMING_MODE_UNSPECIFIED"
}'
{}