High Availability Switch Module
Easy to use application programming interface
»
api
- Command: A request from one side to the other side. The request instructs the other side to take some action, or provide information.
- Response: Each command must be followed by a response. At a minimum it acknowledges the command, but may also contain data results from the command. If a response is not received from the other side in a after a predetermine amount of time, the client API will return a time-out response to the local client.
- Notification: A notice from one side to the other side that a state has changed, and event has occurred, or some signal has been received.
Command Response Example
The image to the right contains two messages, a command and its associated response. Each message is comprised of key-value pairs in plane text format, followed by a blank line to indicate the end of the message. The example command instructs the other side (in this case HAsm) to disconnect a call in progress. The mandatory parameter is the call ID (which may have been received earlier by way of a command/response or a notification).
Notification Example
The image to the right contains two messages, both notifications. The messages are comprised of key-value pairs in plane text format, followed by a blank line to indicate the end of the message. The first example notifies the other side (in this case the customer app) that a user agent has registered. The mandatory parameters are the notice (what type of notification is this), the user agent identified, the user agent string, and the contact string for the UA. In this example these are the fields required by the customer (but many more informational fields are available). The second message notifies the other side (again the customer app) that the local node is promoting to active as it has lost contact with its peer. The mandatory parameters are the reason code (129) and reason message.