Heartbeat Packet
With heartbeat packet, Yeastar S-Series VoIP PBX can update IP, Port, and URL of the connected 3rd party application server if there are any changes.
In addition, when there is no event interaction between the application server and Yeastar S-Series VoIP PBX API, heartbeat packets can be sent to the PBX periodically to prolong the validity time of the token, so to avoid failure of report if the token was erased after 30min.
Endpoint
POST /api/v1.1.0/heartbeat?token={token}
Request Parameters
Name | Importance | Type | Description |
---|---|---|---|
ipaddr
|
Required | String | Updated IP address of the application server. |
port |
Required | String | The API port number that is set on 3rd-party application.
Port range: 0 ~ 65536. |
url |
Optional | String | URL of the application server. This URL is used to specify
the sending path of event report to the application server. Note: If the parameter is not specified, the event report
will be sent to the root folder of the 3rd-party
application server.
|
urlflag |
Optional | String | Specify the URL type:
|
Examples
Request ExampleWhen the 3rd-party application send API heartbeat packet to update IP, Port and URL. IP address is changed to 192.168.5.122, and the port is 8280, URL is changed to 192.168.5.122:8280/report.
POST /api/v1.1.0/heartbeat?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: 192.168.5.150 { "url": "192.168.5.122:8260/report",urlflag: "1" }
HTTP/1.1 200 OK Access-control-allow-origin: * Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE { "status": "Success" }