| Document Center Yeastar Cloud PBX-API
API Change Logs
API Overview
Yeastar Cloud PBX provides API interfaces for you to integrate a 3rd party application server. After the integration, you can achieve variable call features on the 3rd party application server and the PBX will automatically send API reports to the 3rd party application server.
Getting Started
This section is applicable for users who are new to the Yeastar Cloud PBX API. In this section, we introduces the pre-configurations before using the API, API communication methods and protocols, API request structure, and response result.
Enable API Access on PBX
Before you start, enable API access on the PBX first.
Delete Blocked API IP
If an IP exceeds the allowed failed API login attempts, PBX will block the IP and tag the blocked IP as API-IP. You can delete the blocked API IP if the IP is trusted.
Communication Methods
Yeastar Cloud PBX communicates with the 3rd-party application server by two methods.
Request Structure
This topic introduces the structure of API requests, including request method, request URL, and communication protocol.
Response Results
Yeastar Cloud PBX returns the API responses in JSON format.
API Reports
After the 3rd-party application server is connected to the Yeastar Cloud PBX via API interface, PBX will automatically sends API reports to the 3rd-party application server.
API Demo
Yeastar provides an API demo and sample configurations for you to test the API functions with Yeastar Cloud PBX.
Login
Enable API access on the Yeastar Cloud PBX, then access the PBX by the API username and the encrypted MD5 API password.
Refresh API Token
Refresh the API token to ensure that the 3rd-party application server the PBX are connected via the API interface.
Logout
API Interfaces
References of API interfaces and API samples.
Query PBX Information
Query PBX information, such as firmware version, system time, etc.
Save and Apply Settings
By default, when you configure the PBX settings via API interfaces, the settings will be saved and applied automatically. To avoid that the changed settings not being applied, you can invoke this interface to apply all settings after all settings are configured.
Extension
Trunk
Inbound Routes
Outbound Route
IVR
Queue
Audio Calls
Play Prompts
Voicemail
Download Recording Files
Get a random string of the recording file, then combine the random string with other parameters to form a download link.
Download CDR Files
Get a random string of the CDR file, then combine the random string with other parameters to form a download link.
Hotel Wake-up Service
Hotel Check Out
Through this interface, you can perform checkout for the hotel customers.
API Reports
The PBX will send call report to the application server automatically. Call event like call transfer, call failure, call released, etc. will be reported.
'System Startup' Report
'Changed Settings' Report
'Changed Extension Status' Report
The PBX will send a report to the application server when the extension status changes.
'Ringing' Report
'Ring Back' Report
The PBX will send a report to the application server when the called party (extension/inbound call) rings back the calling party.
'Answer a Call' Report
The PBX will send a report to the application server when an extension answers a call. Answering call (the called party) and call answered (the calling party) coexist. In the report, the calling party's number will appear first.
'Call Answered' Report
The PBX will send a report to the application server when the calling party's call is answered. Answering call (the called party) and call answered (the calling party) coexist. In the report, the calling party's number will appear first.
'Call Released' Report
The PBX will send two "BYE" reports to the 3rd-party application server when a call is released. In the first "BYE" report, the user who releases the call will appear first.
'Call Transfer' Report
When there is a call transferred inside the PBX, the PBX will send a report to the application server.
'Call Failure' Report
Generally, call failure event will appear in the response message of the API request. In certain circumstances, the PBX will send the report. Call failure is defined as calls that are failed to connect. Failure of calls initiated manually and by the API will both be reported.
'Keypress' Report
This event is used report key pressed (DTMF information) during a call.
CDR Report
CDR is raw data of all call activities. Records of all calls from the beginning to the end will be kept. When a call is released, the PBX will send a report to the application server in real time.
'Inbound Call Request' Report
If the trunk's API has Control Inbound Call Answering enabled, then whenever there's a call to this trunk, the PBX will send an INVITE event to the application server.
'Inbound Call' Report
If the trunk's API has Control Inbound Call Destination enabled, then when the trunk answers the call, the PBX will send an Incoming event to the application server.
'Prompt Play End' Report
Report the event when the prompt played to the extension and the external number ends.
'Customer Satisfaction Survey Result' Report
Once the DTMF pressed is collected from callers, API will send the customer satisfaction survey result to the client automatically.
Error Code
References of API error codes.