You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).
Description of Data Structures
Event
Event Data
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
Let's say the following call initiation (callback) is used:
POST /extension/@200/callback/ { "dst_num": "+79817654321", "src_num": [ "200" ] } |
---|
Если при этом внутренний номер “200” является владельцем звонка и осуществляет вызов на самого себя, то для оптимизации не будет событий вызова самого внутреннего номера. Например, соединение внутреннего номера "200" с номером "+79817654321" от имени внутреннего номера "200" инициирует "dial-out" с "200" на "+79817654321" (не будет "dial-in" с "200" на "200" и "dial-out" с "200" на "200").
События 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:
{ "url": "https://somehost.com/fordel/show.php?myid=175", "method": "GET", "event_type": "dial-out", "id": 72 }
…
…
…
System response:
{ "url": "https://somehost.com/fordel/show.php?myid=175", "method": "GET", "event_type": "answer", "id": 73 }
…
…
…
System response:
{ "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:
<?php error_log("------"); foreach ($_GET as $key => $value){ error_log("$key => $value"); } ?> |
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: