New State
When the status of a user in Simotel changes, a New State 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.
**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
| Parameters | Defined Data | Sample Data | Description |
|---|---|---|---|
| event_name | - | New State | Event Name |
| exten | - | 553 | Extension (The user for whom the event is generated) |
| state | Idle - InUse Pause - Ringing - Unavailable | InUse | New Status |
| participant | - | 09123456789 | Opposite Party of the Call |
| direction | in-out | in | Incoming or Outgoing Call |
| queue | - | 900 | If the user was in a queue, the queue name is sent |
| cuid | - | 1510564538.919 | Unique Call ID generated by PBX |
| dialer | yes-no | yes | If the operator is dialing and the status is state=InUse (This parameter is populated when the operator starts dialing) |
Sample Output of the New State Event
Idle
{
"event_name": "New State",
"exten": "991",
"state": "Idle",
"unique_id": "1610778618.378"
}
```
</details>
<details><summary>Inuse</summary>
```bash
{
"event_name": "New State",
"exten": "991",
"state": "InUse",
"participant": "992",
"direction": "out",
"queue": "902",
"unique_id": "1610778625.386"
}