WebHooks is a mechanism for notifying the system of events. For instance, when an event occurs in KOMPaaS, the webhook requests the address and parameters of this event, then passes them to an external application.
Usually, "HTTP callbacks" are triggered by some event, such as a call being transferred to another internal subscriber or an incoming call to a virtual PBX. When this event occurs, the originating site sends an HTTP request to the URL specified for the webhook. Users can configure them such that events on one site trigger actions on another.
To create a Webhook on the KOMPaaS site, go to the "Integretions" section >> "WebHooks" tab and click on "New Web hook".
In the pop-up modal window, select the type of webhook event and click the "Create" button.
The most common types of events for which you can create a webhook are:
- Telephony calls (incoming, outgoing, call response, start / end of a call, etc.)
- PBX calls;
- Authorization calls (Password Call, Flash Call, etc.);
- SMS;
- Calltracking;
- Voice robot calls;
The full list of events can be viewed in the webhook creation window. When created, the webhook subscribes to the necessary event and when the event occurs, it sends a request to the specified address.
Webhook settings fields
Title — the name of the webhook.
URL — the address to which the webhook will be sent.
Retry if error — by default, this function is enabled. If the checkbox is marked, in case of an error when sending the webhook to the specified URL, it will retry its submission (It is recommended to keep this function enabled). For more details, see "Resending webhook mechanism".
Choose a method — request types GET or POST:
- GET - the request asks for data from a certain resource (site);
- POST - the request sends data to the server for further processing.
Select the data type — data types JSON or Text:
- JSON - data structure in JSON format;
- Text - free filling. You can fill it at your discretion and according to your needs in any format and structure.
Available parameters — parameters that depend on the event type. Available parameters can be added anywhere in the webhook settings by simply clicking on them.
User parameters — additional parameters that will be added to the JSON structure in addition to the blue variables marked with checkboxes above.
Query parameters — URL query parameters (URL Query Parameters) are additional information that can be added to the URL. It consists of two mandatory elements - the parameter itself and its value, separated by an equals sign (=).
HTTP Headers (HTTP Headers) — a few lines of text in a certain format that either clarify the request or describe the content of the message body.
For more details on request types see:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article