Heartbeat Packet

With heartbeat packet, 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 S-Series 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.

Note: Every time a heartbeat packet is sent, the validity time of the token will be prolonged for 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:
  • 0: The URL is a relative URL.

    For example, the IP address of the application server is 192.168.5.122, port is 8260, url is "report"; PBX will send the API reports to 192.168.5.122:8260/report .

  • 1: The URL is an absolute URL.

    For example, the IP address of the application server is 192.168.5.122, url is "192.168.5.122:8260/report"; PBX will send the API reports to 192.168.5.122:8260/report .

    Note: Using an absolute URL will ensure the API reports to be sent successfully in an complicated network environment.

Examples

Request Example

When 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"
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success"
}