### Main Features Accessible via API Source: https://help.yeastar.com/en/p-series-appliance-edition/developer-guide/about-this-guide.html/index Overview of the core functionalities that can be managed or monitored on the Yeastar P-Series PBX System through its APIs. ```APIDOC ## Main Features Accessible via API ### Description Lists the primary capabilities provided by the Yeastar P-Series PBX System APIs, allowing third-party applications to perform various operations. ### Functionalities - **Query PBX Parameters and Status**: Retrieve information about the PBX configuration and its current operational state. - **Configure PBX Features**: Modify settings and enable/disable features on the PBX. - **Control Calls**: Initiate, manage, and terminate calls programmatically. - **Monitor Events**: Receive real-time notifications about significant occurrences within the PBX. ``` -------------------------------- ### API Request and Response Source: https://help.yeastar.com/en/p-series-appliance-edition/developer-guide/about-this-guide.html/index Third-party applications can interact with the Yeastar P-Series PBX System by sending API requests to query features, configure parameters, and control calls. The PBX responds with the requested resources. ```APIDOC ## API Request and Response ### Description Allows third-party applications to send requests to the PBX to query features, configure parameters, and control calls. The PBX returns a response with the requested resources. ### Method GET, POST, PUT, DELETE (Specific methods depend on the API endpoint) ### Endpoint (Specific endpoints depend on the API functionality) ### Parameters (Details depend on the specific API request) ### Request Example (Example request body will vary based on the API call) ```json { "action": "query", "resource": "call_status" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the request. - **data** (object) - Contains the requested resources or results. #### Response Example ```json { "status": "success", "data": { "call_count": 5, "active_calls": [ { "id": "12345", "caller": "1001", "callee": "1002", "duration": 60 } ] } } ``` ``` -------------------------------- ### Event Subscription and Notification Source: https://help.yeastar.com/en/p-series-appliance-edition/developer-guide/about-this-guide.html/index Third-party applications can subscribe to specific PBX events. The PBX will then proactively send notifications to the application in real-time when these events occur. ```APIDOC ## Event Subscription and Notification ### Description Enables third-party applications to subscribe to desired PBX events. The PBX will proactively send notifications to the application about changes in real-time. ### Method POST (for subscription) ### Endpoint (Specific subscription endpoint will be provided) ### Parameters #### Request Body - **event_type** (string) - Required - The type of event to subscribe to (e.g., 'call_started', 'voicemail_received'). - **callback_url** (string) - Required - The URL where the PBX should send event notifications. ### Request Example ```json { "event_type": "call_ended", "callback_url": "https://your-app.com/api/event-handler" } ``` ### Response #### Success Response (200) - **subscription_id** (string) - A unique identifier for the subscription. - **status** (string) - Confirmation of the subscription. #### Response Example ```json { "subscription_id": "sub_abc123", "status": "subscribed" } ``` ### Event Notification Example (Sent to callback_url) ```json { "event": "call_ended", "timestamp": "2023-10-27T10:30:00Z", "data": { "call_id": "12345", "caller": "1001", "callee": "1002", "duration": 120 } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.