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

Obtaining Connection Information: getconnectinfo

Description

In the H5 video call scenario, an agent is disconnected unexpectedly. To join a video conference again, the agent needs to obtain the connection information.

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}/getconnectinfo

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

True

Agent ID. The value ranges from 101 to 59999.

Method Name in Logs

getConnectInfo

Request Description

  • Message header
    Table 2 Parameters in the request message header

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    Content-Type

    String

    True

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

    2

    Guid

    String

    True

    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

    userType

    String

    True

    Subscriber type.

    The default value is agent, indicating an agent.

    2

    callid

    String

    True

    Call ID.

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.

3

result

object

Connection information displayed after a successful query.

For details about the parameters of this object, see Table 5.

Table 5 Parameter description of result

No.

Parameter

Value Type

Description

1

userId

String

Agent ID.

2

ctime

String

Expiration time.

3

channelId

String

Channel ID (room ID).

4

role

String

Role.

5

ip

String

IP address of the media server access point.

6

port

String

Media server access point port.

7

signalingDomainIn

String

Internal-side signaling domain.

Format: https://{Domain name}:{Port number}.

8

signalingDomainOut

String

External signaling domain.

Format: https://{Domain name}:{Port number}.

9

locationId

String

Node

10

signature

String

Signature.

11

appId

String

User ID.

Triggered Event

None

Error Code

  • 106-011
  • 106-015
  • 100-007

Example

  • Message header
    Content-Type:application/json; charset=UTF-8
    Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • Request parameter
    {
    "callid":"1552524689-16797284",
    "userType":"agent"
    }
  • Response parameter
    {
    "message": "success",
    "retcode": "0",
    "result":
    {
               "userId": "Agent ID",
                "ctime": "Expiration time",
                "channelId": "15945185-345",
                "appId": "8345234631",
                "ip": "xxx.xxx.xxx.xxx",
                "port": "6500",
                "role": "0",
                "signalingDomainIn": "https: //in.isdpdomain.com",
                "signalingDomainOut": "https: //out.isdpdomain.com",
                "locationId": "65535",
                "signature": "xxx",
                "appId": "sdcp0BPcVGymItWppGX6XqrZGTCYa13d"
            }
    
    }