Help Center/ Customer Engagement Center/ API Reference/ Agent Operation Interface Reference/ Multimedia: mediaCall/ Setting the Number of Concurrent Agent Sessions: setcallnumsbymediatype
Updated on 2025-11-13 GMT+08:00

Setting the Number of Concurrent Agent Sessions: setcallnumsbymediatype

Description

This interface is used to set the number of concurrent multimedia sessions of a channel in a skill queue for an agent.

The agent must have the skill queue of the corresponding channel.

Interface Method

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

URI

https://IP address:Port number/agentgateway/resource/mediacall/{agentid}/setcallnumsbymediatype

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

If the CC-Gateway is deployed in single-node mode, set IP address to the CC-Gateway server address and Port number to the HTTPS port number of the CC-Gateway server (the default value is 8043). If the CC-Gateway is deployed in cluster mode, set IP address to the NSLB address and Port number to the default value 8043.

For the CC-Gateway port number on the NSLB, log in to any NSLB node as the nslb user and run the ./nslbctl l command to query the port number. In the query result, the following port is opened by the CC-Gateway to third-party systems through the NSLB.

In the SaaS scenario, contact O&M personnel to obtain the values of IP address and Port number.

Table 1 Parameter in the URI

No.

Parameter

Value Type

Mandatory (Yes/No)

Description

1

agentid

String

Yes

Agent ID. The value ranges from 101 to 999999.

Method Name in Logs

setCallNumsByMediaType

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

    totalCallNum

    Number

    Yes

    Total number of concurrent multimedia sessions.

    Value range: 1–60

    2

    agentMediaCallNums

    Array

    Yes

    Concurrent control by channel. For details about the parameters of this object, see Table 4.

    Table 4 Parameter description of agentMediaCallNums

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    mediaType

    Number

    Yes

    Channel type. The options are as follows:
    • 50: email
    • 51: multimedia web chat
    • 52: SMS message
    • 53: social chat
    • 56: WeChat
    • 57: Facebook
    • 58: Twitter
    • 59: 5G
    • 60: LINE
    • 61: WhatsApp
    • 62: Instagram
    • 63: Telegram

    2

    callNums

    Number

    Yes

    Number of channel-based concurrent sessions.

    Value range: 0–60

    The value 0 indicates that sessions cannot be handled concurrently.

Response Description

Table 5 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.

Error Code

  • 106-011

Example

  • Message header
    Content-Type:application/json; charset=UTF-8
    Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • Request parameter
    {
        "totalCallNum":25,
        "agentMediaCallNums": [
                {
                    "mediaType": 51,
                    "callnums": 9
                },
                {
                    "mediaType": 52,
                    "callnums": 6
                }
            ]
    }
  • Response parameter
    {
        "message": "success",
        "retcode": "0"
    }