Transfer interface request description

一、Transfer interface

1.Interface Introduction

This interface is mainly used to transfer incoming calls, and can be transferred to outside lines, agents or corresponding skill groups.

2.Interface request

  • HTTP request method:POST

  • Request url:{HOST}/v20160818/call/transfer/ACCOUNTID?sig=SIG

  • When requesting, please replace {HOST} with connection data queryDomain name,ACCOUNTID is replaced with the account number, SIG is generated according to the authentication rules, please see the authentication document to see the specific generation rules.

  • Authentication document:Interface authentication

3.The interface parameters are as follows:

parameter name Is required value Parameter interpretation
FromExten yes Agent number Example: Assuming 8001@gs is the agent login account, 8001 is the agent ID
Exten yes Called number Can be passed in, outside number, agent number, skill group number For example: 1501045xxxx, 8000, 10014640
Mode yes number/skillgroup Transfer to skill group as skillgroup, transfer to outside line or agent as number
ActionID no Unique string (can be random) Random code, used by the user to identify the requested operation. The Response returned by the server will carry the ActionID of the corresponding Action; this field will be included in the call event; the maximum length of this field is 40 bytes

4.System returns

Returns JsonObject, example:

{
    "Command": "Response",
    "Succeed": false,
    "Message": "317",
    "ActionID": "Transfer0.2626624043352459",
    "Response": "Transfer"
}

Return value field description:

Field Name value Description
Response Transfer Corresponding Action Name
ActionID Unique string Unique tag for the operation
Succeed process result Whether the request was successful, and the reason will be given in the Message field when it is unsuccessful
Command Response Fixed parameters returned
Message Explanation of results 300 Transfer failed, contact the administrator, the transfer interface in pbx is not open
310Outbound line is not configured
311Transferred user is busy
312Transferred user is not checked in
313Transferred user is on a call
314The transferred user is not logged in as a call
315Users who cannot pass through
316Transfer user does not exist
317The other party is busy and cannot process your transfer
400 Error action:Incorrect request, please check if the parameters passed are valid
401 PBX not found:Account configuration issues
403 forbbiden:Authentication failed
404 Agent not found:Agent not found, please check if the agent extension in the FromExten field is passed correctly
500 Server error:Server Error

二、Cancel the transfer interface

1.Interface Introduction

Cancel a forwarded call

2.Interface request

  • HTTP request method:POST

  • Whether authentication is required:Interface authentication

  • Request url:{HOST}/v20160818/call/canceTransfer/ACCOUNTID?sig=SIG

  • When requesting, please replace {HOST} with connection data queryDomain name,ACCOUNTID is replaced with the account number, SIG is generated according to the authentication rules, please see the authentication document to see the specific generation rules.

  • Interface authentication

3.The interface parameters are as follows:

parameter name Is required value Parameter interpretation
FromExten yes Agent number Example: Assuming 8001@gs is the agent login account, 8001 is the agent ID
ActionID no Unique string (can be random) Random code, used by the user to identify the requested operation. The Response returned by the server will carry the ActionID of the corresponding Action; this field will be included in the call event; the maximum length of this field is 40 bytes

Request instance

{
   "FromExten": "8001",
    "ActionID":"123456789"
}

4.System returns

Returns JsonObject, example:

{
    "Command": "Response",
    "Succeed": true,
    "ActionID": "123456789",
    "Response": "CancelTransfer"
}

Return value field description:

Field Name value Description
Response CancelTransfer Corresponding Action Name
ActionID Unique string Unique tag for the operation
Succeed process result Whether the request was successful, and the reason will be given in the Message field when it is unsuccessful
Command Response Fixed parameters returned
Message Explanation of results 301 This exten is not calling... There is no transfer call for the current agent
400 Error action :please check your params Incoming parameter error, please check your parameters
500 Server error :Server error, please contact the administrator
404 Agent not found :Agent not found
401 PBX not found :Agent where pbx was not found