Asterisk Parking Lot 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 parking lot REST resource allows access to the configuration for parking lots in the system. This resource allows adding, removing, and updating of parking lots 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}/parkingLots

JSON Representation

{
 "id": "ce87c947-81a4-4c10-80ec-0a3f4d67a460",
 "name": "Main",
 "identifier": "default",
 "destinationExtension": "70",
 "destinationContext": "from-internal",
 "permissionDisplayName": "Main <default>",
 "permissionId": "ce87c947-81a4-4c10-80ec-0a3f4d67a460"
}

Property

Type

Description

id

String

Configuration id of the parking lot.

name

String

The display name of the parking lot.

identifier

String

The Asterisk identifier of the parking lot.

destinationExtension

String

The extension used to call the parking lot from the panel.

destinationContext

String

The context used to call the parking lot from the panel.

permissionDisplayName

String

Display name of the parking lot in the permission system.

permissionId

String

Permission id of the parking lot.

Resource Paths

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

Description

Accesses all the parking lots in the core server.

GET 

Gets all the configuration for all the parking lot in the system.

POST

Adds a parking lot to the configuration.

Errors:

  • 409 'A parkingLot with the given id already exists.': Returned if a parking lot with the given id already exists.
  • 409 'A parkingLot with the given identifier already exists.': Returned if a parking lot 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}/parkingLots/{parkingLotId}

Description

Accesses the configuration of a specific parking lot.

Parameters:

  • parkingLotId: The configuration id of the parking lot.

GET

Gets the configuration of the specified parking lot.

Errors:

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

PUT

Updates the specified parking lot configuration.

Errors:

  • 404 'A parkingLot with the given id does not exist': Returned if no parking lot exists with the given id.
  • 409 'A parkingLot with the given identifier already exists.': Returned if a parking lot 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 parking lot.

Errors:

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

Curl Examples

Get all parking lots 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/parkingLots

Get the configuration for a specific parking lot

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

Add a new parking lot

curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"ce87c947-81a4-4c10-80ec-0a3f4d67a460","name":"Main","identifier":"default","destinationExtension":"70","destinationContext":"from-internal"}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots

Delete a parking lot

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

Update a parking lot

curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"ce87c947-81a4-4c10-80ec-0a3f4d67a460","name":"Main New","identifier":"default","destinationExtension":"70","destinationContext":"from-internal"}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots/ce87c947-81a4-4c10-80ec-0a3f4d67a460