Updated on 2023-09-27 GMT+08:00

Session Transfer: transfer

Description

The agent system can invoke this interface to transfer multimedia sessions of a specified call ID to other agents.

Interface Method

The request method must be set to POST. This interface supports only the POST method.

URI

https://ip:port/agentgateway/resource/mediacall/{agentid}/transfer

In the URL, ip indicates the IP address of the CC-Gateway server, and port indicates the HTTPS port number of the CC-Gateway server.

Table 1 Parameter in the URI

No.

Parameter

Data Type

Mandatory (Yes/No)

Description

1

agentid

String

Yes

Agent ID. The value ranges from 101 to 59999.

Method Name in Logs

transfer

Request Description

  • Message header
    Table 2 Parameters in the request message header

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    Content-Type

    String

    Yes

    Coding mode of the message body. The default value is application/json; charset=UTF-8.

    2

    Guid

    String

    Yes

    GUID returned by the sign-in interface during static authentication (AUTHMODE is set to 1) or GUID returned by the polling event query interface during dynamic authentication (AUTHMODE is set to 2).

  • Message body
    Table 3 Parameters in the message body

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    callid

    String

    Yes

    Call ID.

    2

    caller

    String

    No

    Calling number.

    3

    devicetype

    Integer

    Yes

    Type of a transfer-out device.

    1: skill queue

    2: agent

    4: system access code

    4

    mode

    Integer

    Yes

    Transfer-out mode. For details, see Table 4.

    When devicetype is set to 1, the options are as follows:

    0: blind transfer

    2: release-after-transfer

    When devicetype is set to 2, the options are as follows:

    0: blind transfer

    2: release-after-transfer

    When devicetype is set to 4, the options are as follows:

    0: blind transfer

    2: release-after-transfer

    5

    address

    String

    Yes

    Address to which the call is transferred, that is, the device ID corresponding to the target device type. The value contains a maximum of 24 characters.

    When devicetype is set to 1, the value of this parameter is a skill queue ID. When devicetype is set to 2, the value of this parameter is an agent ID. When devicetype is set to 4, the value of this parameter is a system access code.

    6

    calldata

    String

    No

    Data transferred to the target agent. The value can contain a maximum of 2048 bytes.

    7

    skillId

    Integer

    No

    Skill ID. This parameter is valid only when devicetype is set to 2.

Response Description

Table 4 Parameters in the message body

No.

Parameter

Value Type

Description

1

retcode

String

Message sending result.

  • 0: success
  • Other values: failure

2

message

String

Description.

Triggered Event

  • AgentEvent_Connect_Fail
  • AgentEvent_Talking
  • AgentEvent_Call_Release
When the transfer mode is release-after-transfer, the following event is triggered:
  • AgentEvent_SuccTransResult

Error Code

  • 106-004
  • 106-005
  • 106-006
  • 106-009
  • 106-010
  • 106-012

Example

  • Message header
    Content-Type:application/json; charset=UTF-8
    Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • Request parameter
    {
        "callid": "1552524689-16797284",
        "caller": "88880021",
        "devicetype": 2,
        "mode": 2,
        "address": "205",
        "calldata": "help"
    }
  • Response parameter
    {
        "message": "success",
        "retcode": "0"
    }