SimotelSimotel Documentation
فارسی

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

ParametersDefined DataSample DataDescription
event_name-New StateEvent Name
exten-553Extension (The user for whom the event is generated)
stateIdle - InUse Pause - Ringing - UnavailableInUseNew Status
participant-09123456789Opposite Party of the Call
directionin-outinIncoming or Outgoing Call
queue-900If the user was in a queue, the queue name is sent
cuid-1510564538.919Unique Call ID generated by PBX
dialeryes-noyesIf 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"
	}