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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
callidStringCallid of call.Not recommended.Empty string.
uniqueidStringUniqueid of call.Yes, unless callid is specified.Empty string.
stypeStringSource type.NoEmpty string.
snumberStringSource number.NoEmpty string.
ctypeStringCalled type.NoEmpty string.
cnumberStringCalled number.NoEmpty string.
dtypeStringDestination type.NoEmpty string.
dnumberStringDestination number.NoEmpty string.

Either the callid or the uniqueid must be specified, but not both.

Responses

CodeDescription
204Hang up successfully requested.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The 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

VersionChanges
4.0Function added.