JSON API » calls » calls/redirect

Redirects a call. The actual redirect up is asynchronous, and may take a second or two after the function returns.

If the redirect happens on a call that's already been redirected or transferred the system may report incorrect status of the phones involved. Results vary, depending on which call leg is redirected.

Input parameters

Requires authentication and the actions or panel role 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
uniqueidStringUniqueid of call.Yes
ctypeStringCalled type to redirect to. Normally empty string.RecommendedEmpty string.
cnumberStringCalled number to redirect to.Yes
channelInteger1 to redirect the calling channel, 2 to redirect the called channel.No1

Responses

CodeDescription
204Redirect successfully requested.
400Invalid called number specified.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan 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 required and recommended parameters

http://enswitch.example.com/api/json/calls/redirect/?auth_username=user;auth_password=password;uniqueid=1234567890.123456;ctype=;cnumber=2125551234

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.15Privileges required changed.
3.13Function added.