Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

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

Info

The information on this page applies to iSymphony 3.1+.

Description

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

 

Panel
titleOn this page:

Table of Contents
maxLevel2
indent1
 

Root Resource Path

Code Block
communication_manager/rest/config/asterisk/{coreServerId}/extensions

JSON Representation

Code Block
{
  "id": "1584e59e-ce3c-4523-aa2d-af65c95fb29b",
  "extension": "4224",
  "displayName": "Sean",
  "autoAnswer": false,
  "peer": "SIP\/4224",
  "altOriginationMethod": "",
  "agentName": "Sean - Lappy",
  "agentLocation": "Local\/4224@from-queue\/n",
  "agentInterface": "SIP\/4224",
  "agentPenalty": 0,
  "agentPaused": false,
  "originatingContextOverride": "",
  "redirectingContextOverride": "",
  "originateTimeoutOverride": 0,
  "voiceMailContext": "default",
  "voiceMailBox": "4224",
  "permissionDisplayName": "Sean <4224>",
  "permissionId": "1584e59e-ce3c-4523-aa2d-af65c95fb29b"
}
PropertyTypeDescription
id
String

Configuration id of the extension.

extensionStringThe extension number. Used when dialing or transferring to the extensions.
displayName
StringThe display name of the extension.
autoAnswerBooleanFlag specifying if auto answer SIP headers will be added for the initial call backs created by originations in the panel.
peerStringThe peer of the extension. Used to track call state on the extension.
altOriginationMethod
StringAn alternative origination peer to use when making calls from this extension. This is very rarly set to a non blank value.
agentName
StringThe display name for the extension when it is logged in as an agent in the queue.
agentLocation
StringThe location of the extension used to identify the agent destination when this extension is logged into a queue.
agentInterface
StringThe agent device that will be used to track agent state when this extension is logged into a queue.
agentPenalty
IntegerThe default penalty that this extension will be given when it is logged into a queue, via the panel.
agentPaused
BooleanFlag specifying if the agent will be automatically paused when they are logged into a queue, via the panel.
originatingContextOverride
StringAn override to the global originating context set on the core server level.
redirectingContextOverride
StringAn override to the global redirecting context set on the core server level.
originateTimeoutOverride
IntegerAn override to the global origination timeout set on the core server level.
voiceMailContext
StringThe context of the extension's voicemail box.
voiceMailBox
StringThe name of the extension's voicemail box.
permissionDisplayName
StringDisplay name of the extension in the permission system.
permissionId
StringPermission id of the extension.

Resource Paths

communication_manager/rest/config/asterisk/{coreServerId}/extensions
DescriptionAccesses all the extensions in the core server.
GET Gets all the configuration for all the extensions in the system.
POST

Adds a extension to the configuration.

Errors:

  • 409 'An extension with the given id already exists.': Returned if an extension with the given id already exists.
  • 409 'An extension with the given extension number already exists.': Returned if an extension with the given extension number already exists.
  • 409 'An extension with the given peer already exists.': Returned if an extension with the given peer already exists.
  • 412 'No extension provided.': Returned if no extension number was provided.
  • 412 'No displayName provided.': Returned if no display name was provided.
  • 412 'No peer provided.': Returned if no peer was provided.
  • 412 'No altOriginationMethod provided.': Returned if no alternative origination method was provided.
  • 412 'No agentLocation provided.': Returned if no agent location was provided.
  • 412 'No agentInterface provided.': Returned if no agent interface was provided.
  • 412 'No agentName provided.': Returned if no agent name was provided.
  • 412 'No origingatingContextOverride provided.': Returned if no originating context override was provided.
  • 412 'No redirectingContextOverride provided.': Returned if no originating context override was provided.
  • 412 'No voiceMailBox provided.': Returned if no voicemail box was provided.
  • 412 'No voicemailContext provided.': Returned if no voicemail context was provided.
 
communication_manager/rest/config/asterisk/{coreServerId}/extensions/{extensionId}
Description

Accesses the configuration of a specific extension.

Parameters:

  • extensionId: The configuration id of the extension.
GET

Gets the configuration of the specified extension.

Errors:

  • 404 'An extension with the given id does not exist': Returned if no extension exists with the given id.
PUT

Updates the specified extension configuration.

Errors:

  • 404 'An extension with the given id does not exist': Returned if no queue exists with the given id.
  • 409 'An extension with the given extension number already exists.': Returned if an extension with the given extension number already exists.
  • 409 'An extension with the given peer already exists.': Returned if an extension with the given peer already exists.
  • 412 'No extension provided.': Returned if no extension number was provided.
  • 412 'No displayName provided.': Returned if no display name was provided.
  • 412 'No peer provided.': Returned if no peer was provided.
  • 412 'No altOriginationMethod provided.': Returned if no alternative origination method was provided.
  • 412 'No agentLocation provided.': Returned if no agent location was provided.
  • 412 'No agentInterface provided.': Returned if no agent interface was provided.
  • 412 'No agentName provided.': Returned if no agent name was provided.
  • 412 'No origingatingContextOverride provided.': Returned if no originating context override was provided.
  • 412 'No redirectingContextOverride provided.': Returned if no originating context override was provided.
  • 412 'No voiceMailBox provided.': Returned if no voicemail box was provided.
  • 412 'No voicemailContext provided.': Returned if no voicemail context was provided.
DELETE

Deletes the specified extension.

Errors:

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

Sub/Child Resource Paths

communication_manager/rest/config/core/{coreServerId}/extensions/{extensionId}/managingUser
Description

Access the sub/child resource for the user that owns this extension.

Parameters:

  • extensionId: The configuration id of the extension.

Errors:

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

See Asterisk Extension Managing User for more information.

 
communication_manager/rest/config/core/{coreServerId}/extensions/{extensionId}/defaultExtensionUser
Description

Accesses the sub/child resource for the user this extension is a default for.

Parameters:

  • extensionId: The configuration id of the extension.

Errors:

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

See Asterisk Default Extension User for more information.

Curl Examples

Get all extensions in a core server

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

Get the configuration for a specific extension

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

Add a new extension

Code Block
languagebash
curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"1584e59e-ce3c-4523-aa2d-af65c95fb29b","extension":"4224","displayName":"Sean","autoAnswer":false,"peer":"SIP/4224","altOriginationMethod":"","agentName":"Sean","agentLocation":"Local/4224@from-queue/n","agentInterface":"SIP/4224","agentPenalty":0,"agentPaused":false,"originatingContextOverride":"","redirectingContextOverride":"","originateTimeoutOverride":0,"voiceMailContext":"default","voiceMailBox":"4224"}' http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions

Delete an extension

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

Update an extension

Code Block
languagebash
curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","extension":"4224","displayName":"Sean new","autoAnswer":false,"peer":"SIP/4224","altOriginationMethod":"","agentName":"Sean","agentLocation":"Local/4224@from-queue/n","agentInterface":"SIP/4224","agentPenalty":0,"agentPaused":false,"originatingContextOverride":"","redirectingContextOverride":"","originateTimeoutOverride":0,"voiceMailContext":"default","voiceMailBox":"4224"}' http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions/c46f4e60-aba2-4340-a6a5-0c7304d40ba1