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. 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/calls/01RCC3N118B1V0SL8O7GK2LAES000006
{
  "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"
}
This page was last edited on January 11, 2022, at 19:31.
Comments or questions about this documentation? Contact us for support!