Component External management via API
Description
Moves the script during its activity under external control via API (HTTP/WebSocket). +
If the dialog is not yet established (in the `api_start` event, the `state` field has a value other than `dialog`), the control system is required to follow the SIP workflow. That is, the appropriate responses must be sent before the functionality can be utilized. playback, recording, transfers.
The `api_start` event can report the following states: `dialog`, `early`, `ringing`, `incoming`. According to them, and using the transmitted parameters, the external system can determine the current state and select the correct behavior.
Until the 2xx response is sent: a) The transfer (203, refer) should be replaced by sending the 3xx response (202, `answer`). b) Ending the call (201, bye) should be replaced by replying 4x-6xx (202, `answer`). c) Do not use transfer components. d) Do not use media traffic components (playback, recording, etc.), except when the current state of the dialog is when the current state of the dialog is `early', i.e. the last response sent was a reply `183 Session Progress`.
Events of `ivrevents.api_start` and `ivrevents.api_stop` types are generated about the start and end of the component operation. They are sent also by subscription to websocket connections (the `notify` message within the token-api `subscribe`).
Control can only be intercepted by one of the connected systems - the one that first sends the `"ivrapi_accept"` message within its websocket connection (token-api: `ivrapi`).
Further control is performed via websocket token-api `ivrapi`.
Index |
|
Short title |
|
Types of scenarios |
|
Starter module |
|
Mode |
Asynchronous |
Icon |
![]() |
Branching pattern |
Branching, closing |
Properties
Specification | Description |
---|---|
Title: |
Argument containing the key. It is passed to the external system in the message about the component’s start ( |
Title: |
An argument containing additional parameters for the external system. |
Title: |
Argument defining the timeout for waiting for confirmation from one of the external systems connected via websocket token api, in milliseconds. |
Title: |
Variable where the reason for component termination is stored. |
Title: |
The component to which control is transferred after the component is terminated by disabling the external system. |
Title: |
Component to which control is passed on timeout termination. |
Title: |
The component to which control is passed if an error occurs. |