API Events

This topic introduces the API events which are sent from Yeastar Cloud PBX to the application server. We introduce the API event and relevant communication protocol, communication port and interaction flow between the PBX and the application server.

API reports (events) settings

Yeastar Cloud PBX supports to send HTTP events.

HTTP events

Communication protocol
PBX sends HTTP events by short-lived TCP flows.
A new TCP connection will be established every time PBX sends an event. The application server should disconnect the TCP connection after receiving an event.
Communication port
When the application server sends the request of Get API token, the port parameter should be specified in the API request. port defines the monitoring port to receive events.. PBX will send events to the application server through this port.
Event format
JSON.
Requirements
The application server must send the request of Get API token to log in PBX. Token validity must be ensured, or the application server can not receive the events.
Interaction flow
The following figure shows the HTTP events flow between the application server and the PBX.