Asterisk Extension Configuration

Version 7.1 by michaely on 2016/05/31 13:24
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

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 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.

 

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}/extensions

JSON Representation

{
 "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"
}

Property

Type

Description

id

String

Configuration id of the extension.

extension

String

The extension number. Used when dialing or transferring to the extensions.

displayName

String

The display name of the extension.

autoAnswer

Boolean

Flag specifying if auto answer SIP headers will be added for the initial call backs created by originations in the panel.

peer

String

The peer of the extension. Used to track call state on the extension.

altOriginationMethod

String

An alternative origination peer to use when making calls from this extension. This is very rarly set to a non blank value.

agentName

String

The display name for the extension when it is logged in as an agent in the queue.

agentLocation

String

The location of the extension used to identify the agent destination when this extension is logged into a queue.

agentInterface

String

The agent device that will be used to track agent state when this extension is logged into a queue.

agentPenalty

Integer

The default penalty that this extension will be given when it is logged into a queue, via the panel.

agentPaused

Boolean

Flag specifying if the agent will be automatically paused when they are logged into a queue, via the panel.

originatingContextOverride

String

An override to the global originating context set on the core server level.

redirectingContextOverride

String

An override to the global redirecting context set on the core server level.

originateTimeoutOverride

Integer

An override to the global origination timeout set on the core server level.

voiceMailContext

String

The context of the extension's voicemail box.

voiceMailBox

String

The name of the extension's voicemail box.

permissionDisplayName

String

Display name of the extension in the permission system.

permissionId

String

Permission id of the extension.

Resource Paths

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

Description

Accesses 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.

Curl Examples

Get all extensions in a core server

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

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

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

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

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