Revision as of 19:56, January 22, 2016 by Jumunn (talk | contribs) (Update with the copy of version: 8.5.2DRAFT)
Jump to: navigation, search

SetCallDisposition

This operation is part of the Voice API section of the Web Services API.

Overview

Sets the disposition for the specified call using the provided parameters.

If the call is active at the time of the request, it will be processed by updating the key in the user data.

If the call has already been released, then EventUserEvent will be sent 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. This can be obtained from the call resource.
disposition A string value to be used for the call disposition.
dispositionKey An optional string value to be used for the as the userdata key for the call disposition. If not specified, the disposition key configured for the server will be used.

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"
}

Response

{
  "statusCode": 0
}

Notification

If 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!