Use this request to add call events to an Extension.
If successful, the Service returns the Id of the newly created PhoneCallEvent, which is later used to of the phone call event.
The request is made by an App that is registered to a User account.
To create a PhoneCallEvent, issue a HTTP POST request:
This section describes how to format the request to the service.
The following parameters must be sent in the URI fragment.
Id of the User which owns the Extension for which the event is added.
|extension||UAPI-Extension-Number||Yes||The number of the Extension for which the event is added. |
Allowed Extension types:
Cannot be set to @self.
If successful, the request returns the Id of the newly createdand the following HTTP statuses:
|200||The Id of the newly created PhoneCallEvent.|
|204||There is no Id to be returned.|
When it fails, the request returns the following error codes:
|400||pcet_type_invalid||Value supplied in type parameter is missing or invalid. The parameter must be set to one of the following value: 0 for DialIn, 1 for DialOut and 2 for Hangup.|
|400||pce_method_invalid||Value supplied in method parameter is missing or invalid. The parameter must be set to one of the following value: 0 for GET or 1 for POST.|
|400||pce_note_invalid||Value supplied in note parameter is missing or invalid. It must be string and 1024 characters long.|
|400||pce_url_invalid||Value supplied in request URL parameter is missing or invalid. It must be a valid HTTP URL.|
|400||pce_status_invalid||Value supplied in status parameter is missing or invalid. The parameter must be set to one of the following value: 0 for enabled or 1 for disabled.|
|400||extension_invalid||Value supplied in the URI-Fragment as extension is invalid. The parameter must reference the number of an existing extension or cannot be set to @self.|
|400||pce_access_denied||You are not allowed to manage the phone call events.|
Below you can find an example that will help you understand the request and the response.
This example creates a phone call event for the Extension 0003*210. The event is executed when a call is received and it makes a HTTP request to the script
The request is made by an App on behalf of a User.
Assuming that the request has been successful, the Service sends the following answer:
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.