JSON API » calls » calls/update
Updates a call's data. The call is specified by either the callid or uniqueid fields, although use of the uniqueid is strongly encouraged and not all features may work with the callid.
This API method is intended for use with third-party systems such as Microsoft Teams, if they redirect calls without telling Enswitch. It should only be used by developers who understand the implications of changing the call data. The actual telephony of the specified call will not be affected, only the Enswitch data associated with the call, and related features such as busy lamps and queue availability.
Input parameters
Requires authentication and the actions privilege. User must also be an administrator, owner of a telephone line involved, or allowed to use any telephone line.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
callid | String | Callid of call. | Not recommended. | Empty string. |
uniqueid | String | Uniqueid of call. | Yes, unless callid is specified. | Empty string. |
stype | String | Source type. | No | Empty string. |
snumber | String | Source number. | No | Empty string. |
ctype | String | Called type. | No | Empty string. |
cnumber | String | Called number. | No | Empty string. |
dtype | String | Destination type. | No | Empty string. |
dnumber | String | Destination number. | No | Empty string. |
Either the callid or the uniqueid must be specified, but not both.
Responses
Code | Description |
---|---|
204 | Hang up successfully requested. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The call does not exist, or you do not have permission to view it. |
Data returned
No data is returned.
Example: With uniqueid
http://enswitch.example.com/api/json/calls/update/?auth_username=user;auth_password=password;uniqueid=1234567890.123456;ctype=;cnumber=1234567;dtype=phone;dnumber=1234567{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
4.0 | Function added. |