Callback requests

Overview

Manages callback requests associated with the number of a specific SIP account attached to the authorized user.

The request box has the same number as the account it belongs to.
Access to it is provided by the "Callback" IVR script component.

Callback requests are stored in the 'telephony/CallbackRequests' collection.

The full-path collection is available to users for subscription to changes via websocket subscr, as well as CRUD operations via websocket rest.

Requests

HTTP verb Endpoint Description

GET

/rest/v1/user/sip/accounts/<AccountID>/callback_requests

Getting the list of callback requests

GET

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>

Getting the list of callback requests

GET

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>/<Id>

Getting a specific request entity by identifier

PATCH

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>/<Id>

Changing the callback request state

DELETE

/rest/v1/user/sip/accounts/<AccountID>/callback_requests/<Date>/<Id>

Deleting a callback request

For all requests:
Domain type: worker

Getting the list of callback requests

Returns the list of all requests from the box of the SIP account specified by identifier and attached to the authorized user.

The list contains all specified requests for the time interval, bound to the subscriber number.
If the endpoint with a date is used, the initial set is all messages for that date.
Otherwise the 'interval' GET parameter must be specified.

Request

Example request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests?interval=["2022-10-21","2022-10-22"]&limit=3 HTTP/1.1

GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21?limit=3 HTTP/1.1

Response

Example response
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "abonentPhoneNumber": "1234",
    "boxPhoneNumber": "11",
    "dateTime": "2022-10-21T14:00:37.192Z",
    "id": "c534ed44-0183-fad8-8447-7cd30a921f58",
    "status": "new"
  },
  {
    "abonentPhoneNumber": "12",
    "boxPhoneNumber": "11",
    "dateTime": "2022-10-21T11:06:30.081Z",
    "id": "44745728-0183-fa39-1b40-7cd30a921f58",
    "status": "new"
  },
  {
    "abonentPhoneNumber": "13",
    "boxPhoneNumber": "11",
    "dateTime": "2022-10-21T11:06:27.605Z",
    "id": "2a45dccb-0183-fa39-1195-7cd30a921f58",
    "status": "viewed"
  }
]

Getting a specific request entity by identifier

Request

Example request
GET /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21/c534ed44-0183-fad8-8447-7cd30a921f58 HTTP/1.1

Response

Example response
HTTP/1.1 200 OK
Content-Type: application/json

{
  "abonentPhoneNumber": "1234",
  "boxPhoneNumber": "11",
  "dateTime": "2022-10-21T14:00:37.192Z",
  "id": "c534ed44-0183-fad8-8447-7cd30a921f58",
  "status": "new"
}

Changing the callback request state

Changes the status of an existing callback request.

Request

Example request
PATCH /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21/c534ed44-0183-fad8-8447-7cd30a921f58 HTTP/1.1
Content-Type: application/json

{
  "status": "viewed"
}

Response

Example response
HTTP/1.1 200 OK
Content-Type: application/json

{
  "abonentPhoneNumber": "1234",
  "boxPhoneNumber": "11",
  "dateTime": "2022-10-21T14:00:37.192Z",
  "id": "c534ed44-0183-fad8-8447-7cd30a921f58",
  "status": "viewed"
}

Deleting a callback request

Deletes the specified callback request.

Request

Example request
DELETE /rest/v1/user/sip/accounts/c7e163c6-8b5e-cb6e-7bf4-441a912ff0b9/callback_requests/2022-10-21/c534ed44-0183-fad8-8447-7cd30a921f58 HTTP/1.1

Response

Example response
HTTP/1.1 204 No Content