Extension Number Events (/extension/.../event/)
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).
Using this resource, you can notify third-party applications about extension number events. Quantity of monitored events is limited, you can get the limit through the resource "Limits (/limit/)".
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 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:
POST /extension/@200/callback/
{
"dst_num": "+79817654321",
"src_num": [
"200"
]
} |
---|
If at the same time the internal number “200” is the owner of the call and makes a call to itself, then for optimization there will be no call events for the internal number itself. For example, connecting the extension number "200" with the number "+79817654321" on behalf of the extension number "200" initiates the "dial-out" from "200" to "+79817654321" (there will be no "dial-in" from "200" to " 200 "and" dial-out "from" 200 "to" 200 ").
Events message-in и message-out available only for internal numbers of the “phone” type
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:
System response:
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: