JSON API » queues » queues/events/create

Creates a new queue event. Only has effect if the queue is set to record events.

Input parameters

Requires authentication and the administrator role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
queueIntegerID of queue to create event for.Yes
eventStringEvent to record. Empty string for none.RecommendedEmpty string.
calleridStringCallerid of call event is for. Empty string for none.NoEmpty string.
callidStringCallid of call event is for. Empty string for none.NoEmpty string.
channelStringAsterisk channel of call event is for. Empty string for none.NoEmpty string.
dtypeStringDestination type. "forward", "peer", "phone", "sipuri", or empty string for none.NoEmpty string.
dnumberStringDestination number. Empty string for none.NoEmpty string.
keypressStringkey press that triggered event. Empty string for none.NoEmpty string.
positionIntegerPosition of call in queue. 0 for not applicable.No0
timeIntegerUnix timestamp.NoNow.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The queue does not exist, or you do not have permission to view it.

Data returned

No data is returned.

Example: With recommended parameters

http://enswitch.example.com/api/json/queues/events/create/?auth_username=user;auth_password=password;queue=123;event=TEST+EVENT

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.