NewState
When the status of a user in Simotel changes, a NewState event is generated. For example, when a user is idle (Idle or waiting for a call), and a call is sent to them, the event with state=Ringing will be created and sent to the web service when the ringtone is heard. Upon answering, the same event will be created again with state=InUse and sent to the web service.
caution
Warning
No information will be sent to the web service unless the desired events are selected in the API Events section.
Parameters of the Event
Description | Defined Data | Sample Data | Parameters |
---|---|---|---|
Event Name | - | NewState | event_name |
Extension (The user for whom the event is generated) | - | 553 | exten |
New Status | Idle - InUse Pause - Ringing - Unavailable | InUse | state |
Opposite Party of the Call | - | 09991101756 | participant |
Incoming or Outgoing Call | in-out | in | direction |
If the user was in a queue, the queue name is sent | - | 900 | queue |
Unique Call ID generated by PBX | - | 1510564538.919 | cuid |
If the operator is dialing and the status is state=InUse (This parameter is populated when the operator starts dialing) | yes-no | yes | dialer |
Sample Output of the NewState Event
- Idle
- InUse
{
"event_name": "NewState",
"exten": "991",
"state": "Idle",
"unique_id": "1610778618.378"
}
{
"event_name": "NewState",
"exten": "991",
"state": "InUse",
"participant": "992",
"direction": "out",
"queue": "902",
"unique_id": "1610778625.386"
}