Asterisk Queue Configuration

Last modified by ryanp on 2021/09/10 23:34

Warning

This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.

Information

The information on this page applies to iSymphony 3.1+.

Description

The Asterisk queue REST resource allows access to the configuration for queues in the system. This resource allows adding, removing, and updating of queues in the system.

 

On this page:

The [toc] macro is a standalone macro and it cannot be used inline. Click on this message for details.
 

Root Resource Path

communication_manager/rest/config/asterisk/{coreServerId}/queues

JSON Representation

{
 "id": "c46f4e60-aba2-4340-a6a5-0c7304d40ba1",
 "displayName": "IncomingQ",
 "identifier": "5001",
 "destinationExtension": "5001",
 "destinationContext": "from-internal",
 "enabled": false,
 "permissionDisplayName": "IncomingQ <5001>",
 "permissionId": "c46f4e60-aba2-4340-a6a5-0c7304d40ba1"
}

Property

Type

Description

id

String

Configuration id of the queue.

displayName

String

The display name of the queue.

identifier

String

The Asterisk identifier of the queue.

destinationExtension

String

The extension used to call the queue from the panel.

destinationContext

String

The context used to call the queue from the panel.

enabled

Boolean

Flag specifying if the queue is enabled or not.

permissionDisplayName

String

Display name of the queue in the permission system.

permissionId

String

Permission id of the queue.

Resource Paths

communication_manager/rest/config/asterisk/{coreServerId}/queues

Description

Accesses all the queues in the core server.

GET 

Gets all the configuration for all the queues in the system.

POST

Adds a queue to the configuration.

Errors:

  • 409 'A queue with the given id already exists.': Returned if a queue with the given id already exists.
  • 409 'A queue with the given identifier already exists.': Returned if a queue with the given identifier already exists.
  • 412 'No identifier provided.': Returned if no identifier was provided.
  • 412 'No displayName provided.': Returned if no display name was provided.
  • 412 'No destinationContext provided.': Returned if no destination context was provided.
  • 412 'No destinationExtension provided.': Returned if no destination extension was provided.

 

communication_manager/rest/config/asterisk/{coreServerId}/queues/{queueId}

Description

Accesses the configuration of a specific queue.

Parameters:

  • queueId: The configuration id of the queue.

GET

Gets the configuration of the specified queue.

Errors:

  • 404 'A queue with the given id does not exist': Returned if no queue exists with the given id.

PUT

Updates the specified queue configuration.

Errors:

  • 404 'A queue with the given id does not exist': Returned if no queue exists with the given id.
  • 409 'A queue with the given identifier already exists.': Returned if a queue with the given identifier already exists.
  • 412 'No identifier provided.': Returned if no identifier was provided.
  • 412 'No displayName provided.': Returned if no display name was provided.
  • 412 'No destinationContext provided.': Returned if no destination context was provided.
  • 412 'No destinationExtension provided.': Returned if no destination extension was provided.

DELETE

Deletes the specified queue.

Errors:

  • 404 'A queue with the given id does not exist': Returned if no queue exists with the given id.

Curl Examples

Get all queues in a core server

curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues

Get the configuration for a specific queue

curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues/56cf70a3-1ee0-4b09-8f40-297430eeeddf

Add a new queue

curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","displayName":"IncomingQ","identifier":"5001","destinationExtension":"5001","destinationContext":"from-internal","enabled":false}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues

Delete a queue

curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues/56cf70a3-1ee0-4b09-8f40-297430eeeddf

Update a queue

curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","displayName":"IncomingQ","identifier":"5001","destinationExtension":"5001","destinationContext":"from-internal","enabled":false}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues/c46f4e60-aba2-4340-a6a5-0c7304d40ba1