(Update with the copy of version: 8.5.2DRAFT) |
(Update with the copy of version: 8.5.2DRAFT) |
||
Line 3: | Line 3: | ||
This operation is part of the [[VoiceAPI|Voice API]] section of the [[Welcome|Web Services API]]. | This operation is part of the [[VoiceAPI|Voice API]] section of the [[Welcome|Web Services API]]. | ||
==Overview== | ==Overview== | ||
− | Sets the disposition for the specified call | + | Sets the disposition for the specified call. If the call is active at the time of the request, Web Services processes it by updating the key in the user data. If the call has already been released, then Web Services sends the EventUserEvent to propagate the disposition to the reporting solution. |
− | |||
− | If the call is active at the time of the request, it | ||
− | |||
− | If the call has already been released, then | ||
{| | {| | ||
! Request URL | ! Request URL | ||
− | | /api/v2/me/calls/{id} | + | | /api/v2/me/calls/''{id}'' |
|- | |- | ||
− | ! HTTP | + | ! HTTP method |
| POST | | POST | ||
|- | |- | ||
− | ! Required | + | ! Required features |
| api-voice | | api-voice | ||
|} | |} | ||
Line 31: | Line 27: | ||
|- | |- | ||
| callUuid | | callUuid | ||
− | | The UUID of the call to disposition. | + | | The UUID of the call to disposition. You can get this from the [[CallResource|call resource]]. |
|- | |- | ||
| disposition | | disposition | ||
− | | A string value | + | | A string value for the call disposition. |
|- | |- | ||
| dispositionKey | | dispositionKey | ||
− | | An optional string value | + | | An optional string value for the <tt>userdata</tt> key for the call disposition. If not specified, Web Services uses the disposition key configured for the server. |
|} | |} | ||
Line 53: | Line 49: | ||
</source> | </source> | ||
− | === | + | ===HTTP response=== |
<source lang="text"> | <source lang="text"> | ||
{ | { | ||
Line 60: | Line 56: | ||
</source> | </source> | ||
− | === | + | ===CometD notification=== |
− | If this request is sent while the call is still active, Web Services delivers a | + | If you send this request is sent while the call is still active, Web Services delivers a [[CallsMessageType#CallStateChangeMessage|CallStateChangeMessage]]. If the call has been released, there is no notification. |
<source lang="text"> | <source lang="text"> |
Revision as of 18:22, March 25, 2016
SetCallDisposition
This operation is part of the Voice API section of the Web Services API.
Overview
Sets the disposition for the specified call. If the call is active at the time of the request, Web Services processes it by updating the key in the user data. If the call has already been released, then Web Services sends the EventUserEvent to propagate the disposition to the reporting solution.
Request URL | /api/v2/me/calls/{id} |
---|---|
HTTP method | POST |
Required features | api-voice |
Parameters
Parameter | Value |
---|---|
operationName | SetCallDisposition |
callUri | The URI of the call to disposition. |
callUuid | The UUID of the call to disposition. You can get this from the call resource. |
disposition | A string value for the call disposition. |
dispositionKey | An optional string value for the userdata key for the call disposition. If not specified, Web Services uses the disposition key configured for the server. |
Sample
Request
POST api/v2/me/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1
{
"operationName": "SetCallDisposition",
"callUri": "http://127.0.0.1:8080/api/v2/calls/01RCC3N118B1V0SL8O7GK2LAES000006",
"callUuid": "01RCC3N118B1V0SL8O7GK2LAES000006",
"disposition": "Referred",
"dispositionKey": "DispositionCode"
}
HTTP response
{
"statusCode": 0
}
CometD notification
If you send this request is sent while the call is still active, Web Services delivers a CallStateChangeMessage. If the call has been released, there is no notification.
{
"data":{
"notificationType":"AttachedDataChanged",
"call":{
"id":"01RCC3N118B1V0SL8O7GK2LAES000006",
"state":"Established",
"callUuid":"01RCC3N118B1V0SL8O7GK2LAES000006",
"connId":"0071027198180006",
"deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
"participants":[
{
"e164Number":"",
"formattedPhoneNumber":"15001",
"phoneNumber":"15001",
"digits":"15001"
}
],
"dnis":"15000",
"callType":"Internal",
"capabilities":[
"UpdateUserData",
"SendDtmf",
"InitiateConference",
"Hold",
"SingleStepTransfer",
"InitiateTransfer",
"AttachUserData",
"DeleteUserDataPair",
"SingleStepConference",
"DeleteUserData",
"Hangup"
],
"userData":{
"DispositionCode":"Referred"
},
"duration":"262",
"mute":"Off",
"supervisorListeningIn":false,
"monitoredUserMuted":false,
"monitoring":false,
"uri":"http://127.0.0.1:8080/api/v2/me/calls/01RCC3N118B1V0SL8O7GK2LAES000006",
"path":"/calls/01RCC3N118B1V0SL8O7GK2LAES000006"
},
"phoneNumber":"15000",
"messageType":"CallStateChangeMessage"
},
"channel":"/v2/me/calls"
}
Comments or questions about this documentation? Contact us for support!