Communication Methods

Yeastar Cloud PBX communicates with the 3rd-party application server by two methods.

Communication protocol

Request and Response
The API requests and API responses are served over HTTPS.

Request over HTTP or HTTPS is supported. The API communication protocol and port are the same as the web access settings of the Yeastar Cloud PBX.

Note: We recommend that you send requests over HTTPS to enhance security and upload an HTTPS certification to the PBX.
The following figure shows the default web access settings on the Yeastar Cloud PBX. With the default settings, you can access the API interfaces by HTTPS (port 8088) or HTTP (port 80).
  • Protocol: HTTPS (port 8088)
  • Redirect from port 80: Enabled. Accessing the web by HTTP (port 80) will be redirected to HTTPS (8088).

API Reports
The 3rd-party application server sends API reports to the PBX through HTTP protocol.

Communication method

1. The 3rd-party application server sends request to the PBX.

The 3rd-party application server acts as a client; PBX acts as a server.

Note:
  • All API requests should contain an API token.

    The API token is generated when the 3rd-party application server logs in the PBX API successfully.

  • The API token is valid in 30 minutes.

    To ensure the 3rd-party application server and the PBX are connected via API interface, the 3rd-party application should refresh the token in each 30 minutes.

Scenario: The 3rd-party application server initiates a call or query request.
2. The PBX automatically sends API reports to the 3rd-party application server.

Prerequisite: The 3rd-party application server should be connected to the PBX via API interface.

The 3rd-party application server acts as a server; PBX acts as a client.

Note: After receiving API reports from the PBX, the 3rd-party application server should response 200OK, or the PBX will send API reports repeatedly.

Scenario: PBX sends extension status to the application server.