You can test API methods in the API online browser page and without writing any code
Some resources described in the page may not be available by default due to the application type (see Application Creation and Authorization)
Description of Data Structures
Event
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Event Data
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If the request method is GET, the data will be in the request header; but if the request method is POST, the data will be in the request body. In both cases, the data is in the format application/x-www-form-urlencoded.
|
Generation Features
Voice menu (IVR): when a call comes in, a dial-in event is generated, when a call is released, a hangup event is generated (thus, there are no events dial-out and answer).
The queue works with two threads:
Thread | Description |
---|---|
in | When a call is put in the queue this option has the value dial-in, when the connection ends this option has the value hangup (there is no answer event) |
out | When calling each of the queue agents this option has the value dial-in; if the call was answered this option has the value answer; when the connection ends this option has the value hangup |
If the call is forwarded to a number outside the PBX using incoming call rules (the extension number type does not matter), then a dial-out event is generated from this extension number to the corresponding number with the option Transfered: "yes".
Let's say the following call initiation (callback) is used:
|
---|
Если при этом внутренний номер “200” является владельцем звонка и осуществляет вызов на самого себя, то для оптимизации не будет событий вызова самого внутреннего номера. Например, соединение внутреннего номера "200" с номером "+79817654321" от имени внутреннего номера "200" инициирует "dial-out" с "200" на "+79817654321" (не будет "dial-in" с "200" на "200" и "dial-out" с "200" на "200").
Info |
---|
События message-in и message-out доступны только для внутренних номеров типа “phone” |
Example
For extension number 000*099 with ID 175 and call recording enabled, let’s add events 'dial-out', 'answer', 'hangup'. The options "?myid=175" are added to all URLs to make it clear on the side https://somehost.com/ who owns the event if the events are generated from different extension numbers.
…
…
…
System response:
Code Block |
---|
{ "url": "https://somehost.com/fordel/show.php?myid=175", "method": "GET", "event_type": "dial-out", "id": 72 } |
…
…
…
System response:
Code Block |
---|
{ "url": "https://somehost.com/fordel/show.php?myid=175", "method": "GET", "event_type": "answer", "id": 73 } |
…
…
…
System response:
Code Block |
---|
{ "url": "https://somehost.com/fordel/show.php?myid=175", "method": "GET", "event_type": "hangup", "id": 74 } |
If the script show.php on the side somehost.com looks like:
|
then, after a call from the extension number 000*099 to the number 00010005, you may see in the web server log file the records of the form:
Expand | ||
---|---|---|
| ||
|
"Extension Number” Section Resources
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
POST /extension/{extension_id}/event/ Add the extension number event URL Options
JSON Options
Response Fields
|
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
GET /extension/{extension_id}/event/ Get the extension number event list URL Options
Response Fields
|
Expand | ||||
---|---|---|---|---|
| ||||
DELETE /extension/{extension_id}/event/ Delete all events of the extension number URL Options
|
Expand | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
PUT /extension/{extension_id}/event/{id} Update the extension number event URL Options
JSON Options
Response Fields
|
Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
GET /extension/{extension_id}/event/{id} Get the extension number event URL Options
Response Fields
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/event/{id} Delete the extension number event URL Options
|