Signing In
Do not invoke the interface repeatedly before it responds.
Prerequisites
None
Description
This interface is used by an agent to sign in to the platform.
After an agent signs in, the interface described in Obtaining Events of One Agent in Polling Mode is invoked immediately to poll events. If no event occurs within 2 minutes, the agent is signed out.
For an agent:
- If the sign-out interface does not respond, the sign-in interface cannot be invoked.
- If the sign-in interface does not respond, the sign-out interface cannot be invoked.
Interface Method
The request method must be set to PUT. This interface supports only the PUT method.
URI
https://IP address:Port number/agentgateway/resource/onlineagent/{agentid}
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.
|
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
login
Request Description
- Message header
Table 2 Parameter 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.
- Message body
Table 3 Parameters in the message body No.
Parameter
Value Type
Mandatory (Yes/No)
Description
1
password
String
Yes
Password of an employee ID on the CTI platform. The value can contain a maximum of 32 characters.
NOTE:If LOGIN_PWD_DECRYPT_ENABLE is set to true, enter the ciphertext encrypted using the Chinese cryptographic algorithm. The ciphertext is generated by the invoking party.
2
phonenum
String
Yes
Softphone number. The value can contain a maximum of 24 characters.
3
autoanswer
Boolean
No
Whether to enable automatic answering. The default value is true.
4
autoenteridle
Boolean
No
Whether to automatically enter the idle state after a call ends. The default value is true.
5
releasephone
Boolean
No
Whether an agent enters the non-always-off-hook state (the phone is hung up after the call ends) after the agent hangs up. The default value is true.
6
agenttype
Integer
No
Type of the agent who signs in. The default value is 4.
- 4: PC+phone agent
- 11: PC+phone video agent
7
status
Integer
No
Status after an agent signs in. The default value is 4.
- 3: busy
- 4: idle
- 5: wrap-up
- 8: rest
8
ip
String
No
Agent IP address. The default value is 127.0.0.1 and can contain a maximum of 15 characters. IPv6 addresses are not supported.
9
entryIp
String
No
IP address of the gateway to which the agent client application connects.
10
phonelinkage
Boolean
No
Whether to enable phone linkage, including connection and hard phone linkage control. Currently, only eSpace 7910 phones on the CC network are supported.
The default value is false.
11
checkInWebm
Boolean
No
Whether to sign in to the WebM media server. If not, the value false must be passed.
The default value is true.
12
checkInMailm
Boolean
No
Whether to sign in to the MailM server.
The default value is false.
13
vcPhoneNumber
String
No
VC number. The value contains a maximum of 24 characters.
14
listenStatus
Boolean
No
Whether an inspector listens to the sign-in and sign-out operations of an agent.
The default value is false.
15
callBackUri
String
No
Event callback address.
For details about the interface definition, see Calling Back Pushed Events.
16
serviceToken
String
No
Authentication code. The value contains a maximum of 50 characters and cannot contain special characters.
17
serviceworkid
String
No
Business employee ID. The value can contain a maximum of 30 characters.
18
signInMode
String
false
Sign-in mode. The options are as follows:
- 0: WebRTC
- 1: OpenEye
19
time
long
No
Message duration, in seconds. This parameter is mandatory when an agent is in the rest state after sign-in.
Value range: 1–86399
20
restcause
Integer
No
Rest cause code. This parameter is mandatory when an agent is in the rest state after sign-in.
The value ranges from 0 to 255. The value 0 indicates no rest cause code.
If both callBackUri and serviceToken are transferred, the event push mode is used. Otherwise, the event polling mode is used.
Failure to sign in to the WebM or MailM media server does not affect the processing of voice and video businesses.
Response Description
|
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). |
|
3 |
Set-GUID |
String |
Yes |
An example value is JSESSIONID=279fe2*****************0f5.AgentGateway0. In the value, 279fe2*****************0f5.AgentGateway0 is the GUID. |
|
No. |
Parameter |
Value Type |
Description |
|---|---|---|---|
|
1 |
message |
String |
Description. |
|
2 |
retcode |
String |
Error code. The options are as follows: 0: success Other values: failure |
|
3 |
result |
Map |
Object in the returned result after a successful query. For details about the parameters of this object, see Table 6. |
|
4 |
detailCode |
String |
Error code details displayed when the query fails and the returned retcode is 100-003. |
|
No. |
Parameter |
Value Type |
Description |
|---|---|---|---|
|
3.1 |
vdnid |
String |
VCC ID. |
|
3.2 |
workno |
String |
Agent ID. |
|
3.3 |
mediatype |
String |
Whether the agent successfully signs in to the media server of a specific type. T indicates success and F indicates failure. The three characters indicate CTI Server, WebM, and MailM, respectively. For example, TTF indicates that the agent successfully signs in to the CTI Server and WebM but fails to sign in to the MailM. The voice business can be processed only after the agent successfully signs in to the CTI Server. The text chat business can be processed only after the agent successfully signs in to the WebM. Currently, the agent cannot sign in to the MailM. |
|
3.4 |
loginTime |
String |
Sign-in time. The value is a timestamp. |
|
3.5 |
isForceChange |
String |
Whether to forcibly change the password. If the parameter is set to true, the agent must change the password after sign-in. To change the password, invoke the interface described in Changing the Password (Extended).
NOTE:
If the value is true but the agent does not change the password, the agent cannot make calls. |
|
3.6 |
serverName |
String |
Cluster name of the CC-Gateway to which an agent signs in. |
|
3.7 |
timeRemaining |
String |
Remaining password validity period. An empty string indicates that the agent password never expires. The value ranges from 0 to 180 days. |
Triggered Event
If the status parameter is set to 3 (busy) during sign-in, the following events are triggered:
- AgentOther_InService
- AgentState_Ready
- AgentState_SetNotReady_Success
If the status parameter is set to 4 (idle) during sign-in, the following events are triggered:
- AgentOther_InService
- AgentState_Ready
If the status parameter is set to 5 (wrap-up) during sign-in, the following events are triggered:
- AgentOther_InService
- AgentState_Ready
- AgentState_Work
If the status parameter is set to 8 (rest) during sign-in, the following events are triggered:
- AgentOther_InService
- AgentState_Ready
- AgentState_SetRest_Success
If phone linkage is enabled during sign-in, the following event is triggered:
- AgentEvent_linkageCapability
Error Code
- 100-001
- 100-002
- 100-003
- 100-004
- 100-007
- 100-012
- 100-015
- 100-016
- 100-020
- 100-021
- 110-016
- 999-001
Example
- Message header
Content-Type:application/json; charset=UTF-8
- Request parameter
{ "password": "", "phonenum": "40038", "status": "4", "releasephone": "true", "agenttype": "4" } - Response parameter
{ "message": "", "retcode": "0", "result": { "vdnid": 1, "workno": "291", "mediatype": "TTF", "loginTime": "1471585949806", "isForceChange": "false", "serverName": "AgentGateway", "timeRemaining": "9" } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot