Asterisk Extension Group Extensions

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 extension group extensions REST resource allows access to the extensions that are a part of an extension group. This resource allows adding and removing of extensions to and from an extension group.

 

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}/extensionGroups/{extensionGroupId}/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 rarely 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}/extensionGroups/{extensionGroupId}/extensions

Description

Accesses all the extensions that are part of the extension group.

GET 

Gets all the configuration for all the extensions that are part of the extension group.

POST

Adds a extension to the extension group.

Errors:

  • 409 'The specified extension already exists in the extension group.': Returned if the extension is already a part of the extension group.

 

communication_manager/rest/config/asterisk/{coreServerId}/extensionsGroups/{extensionGroupId}/extensions/{extensionId}

Description

Accesses the configuration of a specific extension in the extension group.

Parameters:

  • extensionId: The configuration id of the extension.

GET

Gets the configuration of the specified extension in the extension group.

Errors:

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

DELETE

Removes a specific extension from the extension group.

Errors:

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

Curl Examples

Get all extensions in an extension group

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

Get the configuration for a specific extension in an extension group

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

Add an extension to an extension group

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/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf/extensions

Remove an extension from an extension group

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