Queue Agent events (/agent/.../event/)
You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).
Generation features
Events are generated only when the status changes. For example, if the agent re-sent the login command to the queue, there will be no event.
If the request method is GET, the data will be contained in the request header, but if the request method is POST, the data will be contained in the request body. In both cases, the data is in the application/x-www-form-urlencoded format.
Description of data structures
Example
Let's say a client with ID 12 has a local agent with ID 136, and this agent is assigned to the internal number "000*094". Let's add an event to this agent that is generated when it enters the queue:
System response:
{
"url": "https://somehost.com/fordel/show.php",
"id": 150,
"method": "GET",
"event_type": "agent-login"
}
If on the side of somehost.com show.php script has the following content
<?php
error_log("------");
foreach ($_GET as $key => $value){
error_log("$key => $value");
}
?> |
then after logging in to the queue, you can see the following lines in the web server log:
[Tue May 30 15:07:50 2017] ------
[Tue May 30 15:07:50 2017] agent_status => available
[Tue May 30 15:07:50 2017] agent_type => local
[Tue May 30 15:07:50 2017] event_source => api
[Tue May 30 15:07:50 2017] agent_id => 136
[Tue May 30 15:07:50 2017] extension_name => 000*094@ringme.ru
Resources of the "Client" section
Local Agents
External agents