Skip to content

Instantly share code, notes, and snippets.

@seanbright
Created November 27, 2025 12:21
Show Gist options
  • Select an option

  • Save seanbright/c0ed517ee1f41d71fff92be9e4977ac4 to your computer and use it in GitHub Desktop.

Select an option

Save seanbright/c0ed517ee1f41d71fff92be9e4977ac4 to your computer and use it in GitHub Desktop.
openapi: 3.1.2
info:
title: Asterisk REST Interface Specification
version: 12.0.0
tags:
- name: asterisk
description: Asterisk resources
- name: endpoints
description: Endpoint resources
- name: channels
description: Channel resources
- name: bridges
description: Bridge resources
- name: recordings
description: Recording resources
- name: sounds
description: Sound resources
- name: playbacks
description: Playback control resources
- name: deviceStates
description: Device state resources
- name: mailboxes
description: Mailboxes resources
- name: events
description: WebSocket resource
- name: applications
description: Stasis application resources
paths:
/asterisk/config/dynamic/{configClass}/{objectType}/{id}:
get:
tags:
- asterisk
summary: Retrieve a dynamic configuration object.
parameters:
- name: configClass
in: path
description: The configuration class containing dynamic configuration objects.
required: true
schema:
type: string
- name: objectType
in: path
description: The type of configuration object to retrieve.
required: true
schema:
type: string
- name: id
in: path
description: The unique identifier of the object to retrieve.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ConfigTuple'
'404':
description: "{configClass|objectType|id} not found"
default:
description: Unexpected error
content:
application/json:
schema:
type: string
put:
tags:
- asterisk
summary: Create or update a dynamic configuration object.
requestBody:
description: 'The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { "attribute": "directmedia", "value": "false" } ]'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ConfigTuple'
parameters:
- name: configClass
in: path
description: The configuration class containing dynamic configuration objects.
required: true
schema:
type: string
- name: objectType
in: path
description: The type of configuration object to create or update.
required: true
schema:
type: string
- name: id
in: path
description: The unique identifier of the object to create or update.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ConfigTuple'
'400':
description: Bad request body
'403':
description: Could not create or update object
'404':
description: "{configClass|objectType} not found"
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- asterisk
summary: Delete a dynamic configuration object.
parameters:
- name: configClass
in: path
description: The configuration class containing dynamic configuration objects.
required: true
schema:
type: string
- name: objectType
in: path
description: The type of configuration object to delete.
required: true
schema:
type: string
- name: id
in: path
description: The unique identifier of the object to delete.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'403':
description: Could not delete object
'404':
description: "{configClass|objectType|id} not found"
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/info:
get:
tags:
- asterisk
summary: Gets Asterisk system information.
parameters:
- name: only
in: query
description: Filter information returned
required: true
schema:
type: array
items:
type: string
style: form
explode: false
enum:
- 'build'
- 'system'
- 'config'
- 'status'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AsteriskInfo'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/ping:
get:
tags:
- asterisk
summary: Response pong message.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AsteriskPing'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/modules:
get:
tags:
- asterisk
summary: List Asterisk modules.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Module'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/modules/{moduleName}:
get:
tags:
- asterisk
summary: Get Asterisk module information.
parameters:
- name: moduleName
in: path
description: Module's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Module'
'404':
description: Module could not be found in running modules.
'409':
description: Module information could not be retrieved.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
post:
tags:
- asterisk
summary: Load an Asterisk module.
parameters:
- name: moduleName
in: path
description: Module's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'409':
description: Module could not be loaded.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- asterisk
summary: Unload an Asterisk module.
parameters:
- name: moduleName
in: path
description: Module's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Module not found in running modules.
'409':
description: Module could not be unloaded.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
put:
tags:
- asterisk
summary: Reload an Asterisk module.
parameters:
- name: moduleName
in: path
description: Module's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Module not found in running modules.
'409':
description: Module could not be reloaded.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/logging:
get:
tags:
- asterisk
summary: Gets Asterisk log channel information.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/LogChannel'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/logging/{logChannelName}:
post:
tags:
- asterisk
summary: Adds a log channel.
parameters:
- name: logChannelName
in: path
description: The log channel to add
required: true
schema:
type: string
- name: configuration
in: query
description: levels of the log channel
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Bad request body
'409':
description: Log channel could not be created.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- asterisk
summary: Deletes a log channel.
parameters:
- name: logChannelName
in: path
description: Log channels name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Log channel does not exist.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/logging/{logChannelName}/rotate:
put:
tags:
- asterisk
summary: Rotates a log channel.
parameters:
- name: logChannelName
in: path
description: Log channel's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Log channel does not exist.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/asterisk/variable:
get:
tags:
- asterisk
summary: Get the value of a global variable.
parameters:
- name: variable
in: query
description: The variable to get
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Variable'
'400':
description: Missing variable parameter.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
post:
tags:
- asterisk
summary: Set the value of a global variable.
parameters:
- name: variable
in: query
description: The variable to set
required: true
schema:
type: string
- name: value
in: query
description: The value to set the variable to
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Missing variable parameter.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints:
get:
tags:
- endpoints
summary: List all endpoints.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Endpoint'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints/sendMessage:
put:
tags:
- endpoints
summary: Send a message to some technology URI or endpoint.
requestBody:
description: The "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,
content:
application/json:
schema:
type: object
parameters:
- name: to
in: query
description: The endpoint resource or technology specific URI to send the message to. Valid resources are pjsip, and xmpp.
required: true
schema:
type: string
- name: from
in: query
description: The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip, and xmpp.
required: true
schema:
type: string
- name: body
in: query
description: The body of the message
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Invalid parameters for sending a message.
'404':
description: Endpoint not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints/refer:
post:
tags:
- endpoints
summary: Refer an endpoint or technology URI to some technology URI or endpoint.
requestBody:
description: The "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers. The "display_name" key is used by the PJSIP technology. Its value will be prepended as a display name to the Refer-To URI.
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: to
in: query
description: The endpoint resource or technology specific URI that should be referred to somewhere. Valid resource is pjsip.
required: true
schema:
type: string
- name: from
in: query
description: The endpoint resource or technology specific identity to refer from.
required: true
schema:
type: string
- name: refer_to
in: query
description: The endpoint resource or technology specific URI to refer to.
required: true
schema:
type: string
- name: to_self
in: query
description: If true and "refer_to" refers to an Asterisk endpoint, the "refer_to" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.
required: true
schema:
type: boolean
default: false
responses:
'200':
description: Successful operation
'400':
description: Invalid parameters for referring.
'404':
description: Endpoint not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints/{tech}:
get:
tags:
- endpoints
summary: List available endoints for a given endpoint technology.
parameters:
- name: tech
in: path
description: Technology of the endpoints (pjsip,iax2,...)
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Endpoint'
'404':
description: Endpoints not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints/{tech}/{resource}:
get:
tags:
- endpoints
summary: Details for an endpoint.
parameters:
- name: tech
in: path
description: Technology of the endpoint
required: true
schema:
type: string
- name: resource
in: path
description: ID of the endpoint
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Endpoint'
'400':
description: Invalid parameters for sending a message.
'404':
description: Endpoints not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints/{tech}/{resource}/sendMessage:
put:
tags:
- endpoints
summary: Send a message to some endpoint in a technology.
requestBody:
description: The "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: tech
in: path
description: Technology of the endpoint
required: true
schema:
type: string
- name: resource
in: path
description: ID of the endpoint
required: true
schema:
type: string
- name: from
in: query
description: The endpoint resource or technology specific identity to send this message from. Valid resources are pjsip and xmpp.
required: true
schema:
type: string
- name: body
in: query
description: The body of the message
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Invalid parameters for sending a message.
'404':
description: Endpoint not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/endpoints/{tech}/{resource}/refer:
post:
tags:
- endpoints
summary: Refer an endpoint or technology URI to some technology URI or endpoint.
requestBody:
description: The "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, the pjsip resource type will add the key/value pairs as SIP headers,
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: tech
in: path
description: Technology of the endpoint
required: true
schema:
type: string
- name: resource
in: path
description: ID of the endpoint
required: true
schema:
type: string
- name: from
in: query
description: The endpoint resource or technology specific identity to refer from.
required: true
schema:
type: string
- name: refer_to
in: query
description: The endpoint resource or technology specific URI to refer to.
required: true
schema:
type: string
- name: to_self
in: query
description: If true and "refer_to" refers to an Asterisk endpoint, the "refer_to" value is set to point to this Asterisk endpoint - so the referee is referred to Asterisk. Otherwise, use the contact URI associated with the endpoint.
required: true
schema:
type: boolean
default: false
responses:
'200':
description: Successful operation
'400':
description: Invalid parameters for referring.
'404':
description: Endpoint not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels:
get:
tags:
- channels
summary: List all active channels in Asterisk.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Channel'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
post:
tags:
- channels
summary: Create a new channel (originate).
requestBody:
description: 'The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } }'
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: endpoint
in: query
description: Endpoint to call.
required: true
schema:
type: string
- name: extension
in: query
description: The extension to dial after the endpoint answers. Mutually exclusive with 'app'.
required: true
schema:
type: string
- name: context
in: query
description: The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.
required: true
schema:
type: string
- name: priority
in: query
description: The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.
required: true
schema:
type: number
format: int64
- name: label
in: query
description: The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.
required: true
schema:
type: string
- name: app
in: query
description: The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
required: true
schema:
type: string
- name: appArgs
in: query
description: The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
required: true
schema:
type: string
- name: callerId
in: query
description: CallerID to use when dialing the endpoint or extension.
required: true
schema:
type: string
- name: timeout
in: query
description: Timeout (in seconds) before giving up dialing, or -1 for no timeout.
required: true
schema:
type: number
format: int32
default: 30
- name: channelId
in: query
description: The unique id to assign the channel on creation.
required: true
schema:
type: string
- name: otherChannelId
in: query
description: The unique id to assign the second channel when using local channels.
required: true
schema:
type: string
- name: originator
in: query
description: The unique id of the channel which is originating this one.
required: true
schema:
type: string
- name: formats
in: query
description: The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs".
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'400':
description: Invalid parameters for originating a channel.
'409':
description: Channel with given unique ID already exists.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/create:
post:
tags:
- channels
summary: Create channel.
requestBody:
description: 'The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } }'
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: endpoint
in: query
description: Endpoint for channel communication
required: true
schema:
type: string
- name: app
in: query
description: Stasis Application to place channel into
required: true
schema:
type: string
- name: appArgs
in: query
description: The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
required: true
schema:
type: string
- name: channelId
in: query
description: The unique id to assign the channel on creation.
required: true
schema:
type: string
- name: otherChannelId
in: query
description: The unique id to assign the second channel when using local channels.
required: true
schema:
type: string
- name: originator
in: query
description: Unique ID of the calling channel
required: true
schema:
type: string
- name: formats
in: query
description: The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs".
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'409':
description: Channel with given unique ID already exists.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}:
get:
tags:
- channels
summary: Channel details.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'404':
description: Channel not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
post:
tags:
- channels
summary: Create a new channel (originate with id).
requestBody:
description: 'The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } }'
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: channelId
in: path
description: The unique id to assign the channel on creation.
required: true
schema:
type: string
- name: endpoint
in: query
description: Endpoint to call.
required: true
schema:
type: string
- name: extension
in: query
description: The extension to dial after the endpoint answers. Mutually exclusive with 'app'.
required: true
schema:
type: string
- name: context
in: query
description: The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.
required: true
schema:
type: string
- name: priority
in: query
description: The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.
required: true
schema:
type: number
format: int64
- name: label
in: query
description: The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.
required: true
schema:
type: string
- name: app
in: query
description: The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
required: true
schema:
type: string
- name: appArgs
in: query
description: The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
required: true
schema:
type: string
- name: callerId
in: query
description: CallerID to use when dialing the endpoint or extension.
required: true
schema:
type: string
- name: timeout
in: query
description: Timeout (in seconds) before giving up dialing, or -1 for no timeout.
required: true
schema:
type: number
format: int32
default: 30
- name: otherChannelId
in: query
description: The unique id to assign the second channel when using local channels.
required: true
schema:
type: string
- name: originator
in: query
description: The unique id of the channel which is originating this one.
required: true
schema:
type: string
- name: formats
in: query
description: The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs".
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'400':
description: Invalid parameters for originating a channel.
'409':
description: Channel with given unique ID already exists.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- channels
summary: Delete (i.e. hangup) a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: reason_code
in: query
description: The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://docs.asterisk.org/Configuration/Miscellaneous/Hangup-Cause-Mappings/
required: true
schema:
type: string
- name: reason
in: query
description: Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.
required: true
schema:
type: string
enum:
- 'normal'
- 'busy'
- 'congestion'
- 'no_answer'
- 'timeout'
- 'rejected'
- 'unallocated'
- 'normal_unspecified'
- 'number_incomplete'
- 'codec_mismatch'
- 'interworking'
- 'failure'
- 'answered_elsewhere'
responses:
'200':
description: Successful operation
'400':
description: Invalid reason for hangup provided
'404':
description: Channel not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/continue:
post:
tags:
- channels
summary: Exit application; continue execution in the dialplan.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: context
in: query
description: The context to continue to.
required: true
schema:
type: string
- name: extension
in: query
description: The extension to continue to.
required: true
schema:
type: string
- name: priority
in: query
description: The priority to continue to.
required: true
schema:
type: number
format: int32
- name: label
in: query
description: The label to continue to - will supersede 'priority' if both are provided.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/move:
post:
tags:
- channels
summary: Move the channel from one Stasis application to another.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: app
in: query
description: The channel will be passed to this Stasis application.
required: true
schema:
type: string
- name: appArgs
in: query
description: The application arguments to pass to the Stasis application provided by 'app'.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/redirect:
post:
tags:
- channels
summary: Redirect the channel to a different location.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: endpoint
in: query
description: The endpoint to redirect the channel to
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Endpoint parameter not provided
'404':
description: Channel or endpoint not found
'409':
description: Channel not in a Stasis application
'422':
description: Endpoint is not the same type as the channel
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/answer:
post:
tags:
- channels
summary: Answer a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/ring:
post:
tags:
- channels
summary: Indicate ringing to a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- channels
summary: Stop ringing indication on a channel if locally generated.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/progress:
post:
tags:
- channels
summary: Indicate progress on a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/dtmf:
post:
tags:
- channels
summary: Send provided DTMF to a given channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: dtmf
in: query
description: DTMF To send.
required: true
schema:
type: string
- name: before
in: query
description: Amount of time to wait before DTMF digits (specified in milliseconds) start.
required: true
schema:
type: number
format: int32
default: 0
- name: between
in: query
description: Amount of time in between DTMF digits (specified in milliseconds).
required: true
schema:
type: number
format: int32
default: 100
- name: duration
in: query
description: Length of each DTMF digit (specified in milliseconds).
required: true
schema:
type: number
format: int32
default: 100
- name: after
in: query
description: Amount of time to wait after DTMF digits (specified in milliseconds) end.
required: true
schema:
type: number
format: int32
default: 0
responses:
'200':
description: Successful operation
'400':
description: DTMF is required
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/mute:
post:
tags:
- channels
summary: Mute a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: direction
in: query
description: Direction in which to mute audio
required: true
schema:
type: string
enum:
- 'both'
- 'in'
- 'out'
default: both
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- channels
summary: Unmute a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: direction
in: query
description: Direction in which to unmute audio
required: true
schema:
type: string
enum:
- 'both'
- 'in'
- 'out'
default: both
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/hold:
post:
tags:
- channels
summary: Hold a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- channels
summary: Remove a channel from hold.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/moh:
post:
tags:
- channels
summary: Play music on hold to a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: mohClass
in: query
description: Music on hold class to use
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- channels
summary: Stop playing music on hold to a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/silence:
post:
tags:
- channels
summary: Play silence to a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- channels
summary: Stop playing silence to a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/play:
post:
tags:
- channels
summary: Start playback of media.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: media
in: query
description: Media URIs to play.
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: lang
in: query
description: For sounds, selects language for sound.
required: true
schema:
type: string
- name: offsetms
in: query
description: Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.
required: true
schema:
type: number
format: int32
- name: skipms
in: query
description: Number of milliseconds to skip for forward/reverse operations.
required: true
schema:
type: number
format: int32
default: 3000
- name: playbackId
in: query
description: Playback ID.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Playback'
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/play/{playbackId}:
post:
tags:
- channels
summary: Start playback of media and specify the playbackId.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: playbackId
in: path
description: Playback ID.
required: true
schema:
type: string
- name: media
in: query
description: Media URIs to play.
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: lang
in: query
description: For sounds, selects language for sound.
required: true
schema:
type: string
- name: offsetms
in: query
description: Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.
required: true
schema:
type: number
format: int32
- name: skipms
in: query
description: Number of milliseconds to skip for forward/reverse operations.
required: true
schema:
type: number
format: int32
default: 3000
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Playback'
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/record:
post:
tags:
- channels
summary: Start a recording.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: name
in: query
description: Recording's filename
required: true
schema:
type: string
- name: format
in: query
description: Format to encode audio in
required: true
schema:
type: string
- name: maxDurationSeconds
in: query
description: Maximum duration of the recording, in seconds. 0 for no limit
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
- name: maxSilenceSeconds
in: query
description: Maximum duration of silence, in seconds. 0 for no limit
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
- name: ifExists
in: query
description: Action to take if a recording with the same name already exists.
required: true
schema:
type: string
enum:
- 'fail'
- 'overwrite'
- 'append'
default: fail
- name: beep
in: query
description: Play beep when recording begins
required: true
schema:
type: boolean
default: false
- name: terminateOn
in: query
description: DTMF input to terminate recording
required: true
schema:
type: string
enum:
- 'none'
- 'any'
- '*'
- '#'
default: none
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/LiveRecording'
'400':
description: Invalid parameters
'404':
description: Channel not found
'409':
description: Channel is not in a Stasis application; the channel is currently bridged with other channels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail
'422':
description: The format specified is unknown on this system
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/variable:
get:
tags:
- channels
summary: Get the value of a channel variable or function.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: variable
in: query
description: The channel variable or function to get
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Variable'
'400':
description: Missing variable parameter.
'404':
description: Channel or variable not found
'409':
description: Channel not in a Stasis application
default:
description: Unexpected error
content:
application/json:
schema:
type: string
post:
tags:
- channels
summary: Set the value of a channel variable or function.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: variable
in: query
description: The channel variable or function to set
required: true
schema:
type: string
- name: value
in: query
description: The value to set the variable to
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Missing variable parameter.
'404':
description: Channel not found
'409':
description: Channel not in a Stasis application
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/snoop:
post:
tags:
- channels
summary: Start snooping.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: spy
in: query
description: Direction of audio to spy on
required: true
schema:
type: string
enum:
- 'none'
- 'both'
- 'out'
- 'in'
default: none
- name: whisper
in: query
description: Direction of audio to whisper into
required: true
schema:
type: string
enum:
- 'none'
- 'both'
- 'out'
- 'in'
default: none
- name: app
in: query
description: Application the snooping channel is placed into
required: true
schema:
type: string
- name: appArgs
in: query
description: The application arguments to pass to the Stasis application
required: true
schema:
type: string
- name: snoopId
in: query
description: Unique ID to assign to snooping channel
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'400':
description: Invalid parameters
'404':
description: Channel not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/snoop/{snoopId}:
post:
tags:
- channels
summary: Start snooping.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: snoopId
in: path
description: Unique ID to assign to snooping channel
required: true
schema:
type: string
- name: spy
in: query
description: Direction of audio to spy on
required: true
schema:
type: string
enum:
- 'none'
- 'both'
- 'out'
- 'in'
default: none
- name: whisper
in: query
description: Direction of audio to whisper into
required: true
schema:
type: string
enum:
- 'none'
- 'both'
- 'out'
- 'in'
default: none
- name: app
in: query
description: Application the snooping channel is placed into
required: true
schema:
type: string
- name: appArgs
in: query
description: The application arguments to pass to the Stasis application
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'400':
description: Invalid parameters
'404':
description: Channel not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/dial:
post:
tags:
- channels
summary: Dial a created channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: caller
in: query
description: Channel ID of caller
required: true
schema:
type: string
- name: timeout
in: query
description: Dial timeout
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
responses:
'200':
description: Successful operation
'404':
description: Channel cannot be found.
'409':
description: Channel cannot be dialed.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/rtp_statistics:
get:
tags:
- channels
summary: RTP stats on a channel.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RTPstat'
'404':
description: Channel cannot be found.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/externalMedia:
post:
tags:
- channels
summary: Start an External Media session.
requestBody:
description: 'The "variables" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { "endpoint": "SIP/Alice", "variables": { "CALLERID(name)": "Alice" } }'
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: channelId
in: query
description: The unique id to assign the channel on creation.
required: true
schema:
type: string
- name: app
in: query
description: Stasis Application to place channel into
required: true
schema:
type: string
- name: external_host
in: query
description: Hostname/ip:port or websocket_client connection ID of external host. May be empty for a websocket server connection.
required: true
schema:
type: string
- name: encapsulation
in: query
description: Payload encapsulation protocol. Must be 'none' for the websocket transport.
required: true
schema:
type: string
enum:
- 'rtp'
- 'audiosocket'
- 'none'
default: rtp
- name: transport
in: query
description: Transport protocol
required: true
schema:
type: string
enum:
- 'udp'
- 'tcp'
- 'websocket'
default: udp
- name: connection_type
in: query
description: Connection type (client/server). 'server' is only valid for the websocket transport.
required: true
schema:
type: string
enum:
- 'client'
- 'server'
default: client
- name: format
in: query
description: Format to encode audio in
required: true
schema:
type: string
- name: direction
in: query
description: External media direction
required: true
schema:
type: string
enum:
- 'both'
default: both
- name: data
in: query
description: An arbitrary data field
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'400':
description: Invalid parameters
'409':
description: Channel is not in a Stasis application; Channel is already bridged
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/channels/{channelId}/transfer_progress:
post:
tags:
- channels
summary: Inform the channel about the progress of the attended/blind transfer.
parameters:
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
- name: states
in: query
description: The state of the progress
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'400':
description: Endpoint parameter not provided
'404':
description: Channel or endpoint not found
'409':
description: Channel not in a Stasis application
'412':
description: Channel in invalid state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges:
get:
tags:
- bridges
summary: List all active bridges in Asterisk.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Bridge'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
post:
tags:
- bridges
summary: Create a new bridge.
parameters:
- name: type
in: query
description: Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label).
required: true
schema:
type: string
- name: bridgeId
in: query
description: Unique ID to give to the bridge being created.
required: true
schema:
type: string
- name: name
in: query
description: Name to give to the bridge being created.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Bridge'
'409':
description: Bridge with the same bridgeId already exists
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}:
post:
tags:
- bridges
summary: Create a new bridge.
parameters:
- name: type
in: query
description: Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media, video_sfu, video_single, sdp_label) to set.
required: true
schema:
type: string
- name: bridgeId
in: path
description: Unique ID to give to the bridge being created.
required: true
schema:
type: string
- name: name
in: query
description: Set the name of the bridge.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Bridge'
'409':
description: Bridge with the same bridgeId already exists
default:
description: Unexpected error
content:
application/json:
schema:
type: string
get:
tags:
- bridges
summary: Get bridge details.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Bridge'
'404':
description: Bridge not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- bridges
summary: Shut down a bridge.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Bridge not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/addChannel:
post:
tags:
- bridges
summary: Add a channel to a bridge.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: channel
in: query
description: Ids of channels to add to bridge
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: role
in: query
description: Channel's role in the bridge
required: true
schema:
type: string
- name: absorbDTMF
in: query
description: Absorb DTMF coming from this channel, preventing it to pass through to the bridge
required: true
schema:
type: boolean
default: false
- name: mute
in: query
description: Mute audio from this channel, preventing it to pass through to the bridge
required: true
schema:
type: boolean
default: false
- name: inhibitConnectedLineUpdates
in: query
description: Do not present the identity of the newly connected channel to other bridge members
required: true
schema:
type: boolean
default: false
responses:
'200':
description: Successful operation
'400':
description: Channel not found
'404':
description: Bridge not found
'409':
description: Bridge not in Stasis application; Channel currently recording
'422':
description: Channel not in Stasis application
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/removeChannel:
post:
tags:
- bridges
summary: Remove a channel from a bridge.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: channel
in: query
description: Ids of channels to remove from bridge
required: true
schema:
type: array
items:
type: string
style: form
explode: false
responses:
'200':
description: Successful operation
'400':
description: Channel not found
'404':
description: Bridge not found
'409':
description: Bridge not in Stasis application
'422':
description: Channel not in this bridge
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/videoSource/{channelId}:
post:
tags:
- bridges
summary: Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: channelId
in: path
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Bridge or Channel not found
'409':
description: Channel not in Stasis application
'422':
description: Channel not in this Bridge
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/videoSource:
delete:
tags:
- bridges
summary: Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Bridge not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/moh:
post:
tags:
- bridges
summary: Play music on hold to a bridge or change the MOH class that is playing.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: mohClass
in: query
description: Channel's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Bridge not found
'409':
description: Bridge not in Stasis application
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- bridges
summary: Stop playing music on hold to a bridge.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Bridge not found
'409':
description: Bridge not in Stasis application
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/play:
post:
tags:
- bridges
summary: Start playback of media on a bridge.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: media
in: query
description: Media URIs to play.
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: announcer_format
in: query
description: Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.
required: true
schema:
type: string
- name: lang
in: query
description: For sounds, selects language for sound.
required: true
schema:
type: string
- name: offsetms
in: query
description: Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
- name: skipms
in: query
description: Number of milliseconds to skip for forward/reverse operations.
required: true
schema:
type: number
format: int32
minimum: 0
default: 3000
- name: playbackId
in: query
description: Playback Id.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Playback'
'404':
description: Bridge not found
'409':
description: Bridge not in a Stasis application
'422':
description: The format specified is unknown on this system
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/play/{playbackId}:
post:
tags:
- bridges
summary: Start playback of media on a bridge.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: playbackId
in: path
description: Playback ID.
required: true
schema:
type: string
- name: media
in: query
description: Media URIs to play.
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: announcer_format
in: query
description: Format of the 'Anouncer' channel attached to the bridge. Defaults to the format of the channel in the bridge with the highest sampe rate.
required: true
schema:
type: string
- name: lang
in: query
description: For sounds, selects language for sound.
required: true
schema:
type: string
- name: offsetms
in: query
description: Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
- name: skipms
in: query
description: Number of milliseconds to skip for forward/reverse operations.
required: true
schema:
type: number
format: int32
minimum: 0
default: 3000
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Playback'
'404':
description: Bridge not found
'409':
description: Bridge not in a Stasis application
'422':
description: The format specified is unknown on this system
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/bridges/{bridgeId}/record:
post:
tags:
- bridges
summary: Start a recording.
parameters:
- name: bridgeId
in: path
description: Bridge's id
required: true
schema:
type: string
- name: name
in: query
description: Recording's filename
required: true
schema:
type: string
- name: format
in: query
description: Format to encode audio in
required: true
schema:
type: string
- name: recorder_format
in: query
description: Format of the 'Recorder' channel attached to the bridge. Defaults to the same format as the 'format' parameter.
required: true
schema:
type: string
- name: maxDurationSeconds
in: query
description: Maximum duration of the recording, in seconds. 0 for no limit.
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
- name: maxSilenceSeconds
in: query
description: Maximum duration of silence, in seconds. 0 for no limit.
required: true
schema:
type: number
format: int32
minimum: 0
default: 0
- name: ifExists
in: query
description: Action to take if a recording with the same name already exists.
required: true
schema:
type: string
enum:
- 'fail'
- 'overwrite'
- 'append'
default: fail
- name: beep
in: query
description: Play beep when recording begins
required: true
schema:
type: boolean
default: false
- name: terminateOn
in: query
description: DTMF input to terminate recording.
required: true
schema:
type: string
enum:
- 'none'
- 'any'
- '*'
- '#'
default: none
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/LiveRecording'
'400':
description: Invalid parameters
'404':
description: Bridge not found
'409':
description: Bridge is not in a Stasis application; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail
'422':
description: The format specified is unknown on this system
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/stored:
get:
tags:
- recordings
summary: List recordings that are complete.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/StoredRecording'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/stored/{recordingName}:
get:
tags:
- recordings
summary: Get a stored recording's details.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/StoredRecording'
'404':
description: Recording not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- recordings
summary: Delete a stored recording.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/stored/{recordingName}/file:
get:
tags:
- recordings
summary: Get the file associated with the stored recording.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: string
format: binary
'403':
description: The recording file could not be opened
'404':
description: Recording not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/stored/{recordingName}/copy:
post:
tags:
- recordings
summary: Copy a stored recording.
parameters:
- name: recordingName
in: path
description: The name of the recording to copy
required: true
schema:
type: string
- name: destinationRecordingName
in: query
description: The destination name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/StoredRecording'
'404':
description: Recording not found
'409':
description: A recording with the same name already exists on the system
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/live/{recordingName}:
get:
tags:
- recordings
summary: List live recordings.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/LiveRecording'
'404':
description: Recording not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- recordings
summary: Stop a live recording and discard it.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/live/{recordingName}/stop:
post:
tags:
- recordings
summary: Stop a live recording and store it.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/live/{recordingName}/pause:
post:
tags:
- recordings
summary: Pause a live recording.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
'409':
description: Recording not in session
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- recordings
summary: Unpause a live recording.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
'409':
description: Recording not in session
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/recordings/live/{recordingName}/mute:
post:
tags:
- recordings
summary: Mute a live recording.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
'409':
description: Recording not in session
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- recordings
summary: Unmute a live recording.
parameters:
- name: recordingName
in: path
description: The name of the recording
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Recording not found
'409':
description: Recording not in session
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/sounds:
get:
tags:
- sounds
summary: List all sounds.
parameters:
- name: lang
in: query
description: Lookup sound for a specific language.
required: true
schema:
type: string
- name: format
in: query
description: Lookup sound in a specific format.
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Sound'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/sounds/{soundId}:
get:
tags:
- sounds
summary: Get a sound's details.
parameters:
- name: soundId
in: path
description: Sound's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Sound'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/playbacks/{playbackId}:
get:
tags:
- playbacks
summary: Get a playback's details.
parameters:
- name: playbackId
in: path
description: Playback's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Playback'
'404':
description: The playback cannot be found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- playbacks
summary: Stop a playback.
parameters:
- name: playbackId
in: path
description: Playback's id
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: The playback cannot be found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/playbacks/{playbackId}/control:
post:
tags:
- playbacks
summary: Control a playback.
parameters:
- name: playbackId
in: path
description: Playback's id
required: true
schema:
type: string
- name: operation
in: query
description: Operation to perform on the playback.
required: true
schema:
type: string
enum:
- 'restart'
- 'pause'
- 'unpause'
- 'reverse'
- 'forward'
responses:
'200':
description: Successful operation
'400':
description: The provided operation parameter was invalid
'404':
description: The playback cannot be found
'409':
description: The operation cannot be performed in the playback's current state
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/deviceStates:
get:
tags:
- deviceStates
summary: List all ARI controlled device states.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DeviceState'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/deviceStates/{deviceName}:
get:
tags:
- deviceStates
summary: Retrieve the current state of a device.
parameters:
- name: deviceName
in: path
description: Name of the device
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceState'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
put:
tags:
- deviceStates
summary: Change the state of a device controlled by ARI. (Note - implicitly creates the device state).
parameters:
- name: deviceName
in: path
description: Name of the device
required: true
schema:
type: string
- name: deviceState
in: query
description: Device state value
required: true
schema:
type: string
enum:
- 'NOT_INUSE'
- 'INUSE'
- 'BUSY'
- 'INVALID'
- 'UNAVAILABLE'
- 'RINGING'
- 'RINGINUSE'
- 'ONHOLD'
responses:
'200':
description: Successful operation
'404':
description: Device name is missing
'409':
description: Uncontrolled device specified
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- deviceStates
summary: Destroy a device-state controlled by ARI.
parameters:
- name: deviceName
in: path
description: Name of the device
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Device name is missing
'409':
description: Uncontrolled device specified
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/mailboxes:
get:
tags:
- mailboxes
summary: List all mailboxes.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Mailbox'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/mailboxes/{mailboxName}:
get:
tags:
- mailboxes
summary: Retrieve the current state of a mailbox.
parameters:
- name: mailboxName
in: path
description: Name of the mailbox
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Mailbox'
'404':
description: Mailbox not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
put:
tags:
- mailboxes
summary: Change the state of a mailbox. (Note - implicitly creates the mailbox).
parameters:
- name: mailboxName
in: path
description: Name of the mailbox
required: true
schema:
type: string
- name: oldMessages
in: query
description: Count of old messages in the mailbox
required: true
schema:
type: number
format: int32
- name: newMessages
in: query
description: Count of new messages in the mailbox
required: true
schema:
type: number
format: int32
responses:
'200':
description: Successful operation
'404':
description: Mailbox not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- mailboxes
summary: Destroy a mailbox.
parameters:
- name: mailboxName
in: path
description: Name of the mailbox
required: true
schema:
type: string
responses:
'200':
description: Successful operation
'404':
description: Mailbox not found
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/events:
get:
tags:
- events
summary: WebSocket connection for events.
parameters:
- name: app
in: query
description: Applications to subscribe to.
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: subscribeAll
in: query
description: Subscribe to all Asterisk events. If provided, the applications listed will be subscribed to all events, effectively disabling the application specific subscriptions. Default is 'false'.
required: true
schema:
type: boolean
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/events/user/{eventName}:
post:
tags:
- events
summary: Generate a user event.
requestBody:
description: 'The "variables" key in the body object holds custom key/value pairs to add to the user event. Ex. { "variables": { "key": "value" } }'
content:
application/json:
schema:
$ref: '#/components/schemas/VariableBag'
parameters:
- name: eventName
in: path
description: Event name
required: true
schema:
type: string
- name: application
in: query
description: The name of the application that will receive this event
required: true
schema:
type: string
- name: source
in: query
description: "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}"
required: true
schema:
type: array
items:
type: string
style: form
explode: false
responses:
'200':
description: Successful operation
'404':
description: Application does not exist.
'422':
description: Event source not found.
'400':
description: Invalid even tsource URI or userevent data.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/applications:
get:
tags:
- applications
summary: List all applications.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Application'
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/applications/{applicationName}:
get:
tags:
- applications
summary: Get details of an application.
parameters:
- name: applicationName
in: path
description: Application's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'404':
description: Application does not exist.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/applications/{applicationName}/subscription:
post:
tags:
- applications
summary: Subscribe an application to a event source.
parameters:
- name: applicationName
in: path
description: Application's name
required: true
schema:
type: string
- name: eventSource
in: query
description: "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}"
required: true
schema:
type: array
items:
type: string
style: form
explode: false
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Missing parameter.
'404':
description: Application does not exist.
'422':
description: Event source does not exist.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
delete:
tags:
- applications
summary: Unsubscribe an application from an event source.
parameters:
- name: applicationName
in: path
description: Application's name
required: true
schema:
type: string
- name: eventSource
in: query
description: "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}"
required: true
schema:
type: array
items:
type: string
style: form
explode: false
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Missing parameter; event source scheme not recognized.
'404':
description: Application does not exist.
'409':
description: Application not subscribed to event source.
'422':
description: Event source does not exist.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
/applications/{applicationName}/eventFilter:
put:
tags:
- applications
summary: Filter application events types.
requestBody:
description: Specify which event types to allow/disallow
content:
application/json:
schema:
type: object
parameters:
- name: applicationName
in: path
description: Application's name
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
'400':
description: Bad request.
'404':
description: Application does not exist.
default:
description: Unexpected error
content:
application/json:
schema:
type: string
components:
schemas:
BuildInfo:
type: object
description: Info about how Asterisk was built
properties:
os:
type: string
description: OS Asterisk was built on.
kernel:
type: string
description: Kernel version Asterisk was built on.
options:
type: string
description: Compile time options, or empty string if default.
machine:
type: string
description: Machine architecture (x86_64, i686, ppc, etc.)
date:
type: string
description: Date and time when Asterisk was built.
user:
type: string
description: Username that build Asterisk
required:
- os
- kernel
- options
- machine
- date
- user
SystemInfo:
type: object
description: Info about Asterisk
properties:
version:
type: string
description: Asterisk version.
entity_id:
type: string
required:
- version
- entity_id
SetId:
type: object
description: Effective user/group id
properties:
user:
type: string
description: Effective user id.
group:
type: string
description: Effective group id.
required:
- user
- group
ConfigInfo:
type: object
description: Info about Asterisk configuration
properties:
name:
type: string
description: Asterisk system name.
default_language:
type: string
description: Default language for media playback.
max_channels:
type: number
format: int32
description: Maximum number of simultaneous channels.
max_open_files:
type: number
format: int32
description: Maximum number of open file handles (files, sockets).
max_load:
type: number
format: double
description: Maximum load avg on system.
setid:
$ref: '#/components/schemas/SetId'
required:
- name
- default_language
StatusInfo:
type: object
description: Info about Asterisk status
properties:
startup_time:
type: string
format: date-time
description: Time when Asterisk was started.
last_reload_time:
type: string
format: date-time
description: Time when Asterisk was last reloaded.
required:
- startup_time
- last_reload_time
AsteriskInfo:
type: object
description: Asterisk system information
properties:
build:
$ref: '#/components/schemas/BuildInfo'
system:
$ref: '#/components/schemas/SystemInfo'
config:
$ref: '#/components/schemas/ConfigInfo'
status:
$ref: '#/components/schemas/StatusInfo'
AsteriskPing:
type: object
description: Asterisk ping information
properties:
asterisk_id:
type: string
description: Asterisk id info
ping:
type: string
description: Always string value is pong
timestamp:
type: string
description: The timestamp string of request received time
required:
- asterisk_id
- ping
- timestamp
Module:
type: object
description: Details of an Asterisk module
properties:
name:
type: string
description: The name of this module
description:
type: string
description: The description of this module
use_count:
type: number
format: int32
description: The number of times this module is being used
status:
type: string
description: The running status of this module
support_level:
type: string
description: The support state of this module
required:
- name
- description
- use_count
- status
- support_level
LogChannel:
type: object
description: Details of an Asterisk log channel
properties:
channel:
type: string
description: The log channel path
type:
type: string
description: Types of logs for the log channel
status:
type: string
description: Whether or not a log type is enabled
configuration:
type: string
description: The various log levels
required:
- channel
- type
- status
- configuration
Variable:
type: object
description: The value of a channel variable
properties:
value:
type: string
description: The value of the variable requested
required:
- value
ConfigTuple:
type: object
description: A key/value pair that makes up part of a configuration object.
properties:
attribute:
type: string
description: A configuration object attribute.
value:
type: string
description: The value for the attribute.
required:
- attribute
- value
Endpoint:
type: object
description:
|
An external device that may offer/accept calls to/from Asterisk. Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.
properties:
technology:
type: string
description: Technology of the endpoint
resource:
type: string
description: Identifier of the endpoint, specific to the given technology.
state:
type: string
enum:
- 'unknown'
- 'offline'
- 'online'
description: Endpoint's state
channel_ids:
type: array
items:
type: string
description: Id's of channels associated with this endpoint
required:
- technology
- resource
- channel_ids
TextMessage:
type: object
description: A text message.
properties:
from:
type: string
description: A technology specific URI specifying the source of the message. For pjsip technology, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.
to:
type: string
description: A technology specific URI specifying the destination of the message. Valid technologies include pjsip, and xmp. The destination of a message should be an endpoint.
body:
type: string
description: The text of the message.
variables:
type: object
description: Technology specific key/value pairs (JSON object) associated with the message.
required:
- from
- to
- body
Dialed:
type: object
description: Dialed channel information.
DialplanCEP:
type: object
description: Dialplan location (context/extension/priority)
properties:
context:
type: string
description: Context in the dialplan
exten:
type: string
description: Extension in the dialplan
priority:
type: number
format: int64
description: Priority in the dialplan
app_name:
type: string
description: Name of current dialplan application
app_data:
type: string
description: Parameter of current dialplan application
required:
- context
- exten
- priority
- app_name
- app_data
CallerID:
type: object
description: Caller identification
properties:
name:
type: string
number:
type: string
required:
- name
- number
RTPstat:
type: object
description: A statistics of a RTP.
properties:
txcount:
type: number
format: int32
description: Number of packets transmitted.
rxcount:
type: number
format: int32
description: Number of packets received.
txjitter:
type: number
format: double
description: Jitter on transmitted packets.
rxjitter:
type: number
format: double
description: Jitter on received packets.
remote_maxjitter:
type: number
format: double
description: Maximum jitter on remote side.
remote_minjitter:
type: number
format: double
description: Minimum jitter on remote side.
remote_normdevjitter:
type: number
format: double
description: Average jitter on remote side.
remote_stdevjitter:
type: number
format: double
description: Standard deviation jitter on remote side.
local_maxjitter:
type: number
format: double
description: Maximum jitter on local side.
local_minjitter:
type: number
format: double
description: Minimum jitter on local side.
local_normdevjitter:
type: number
format: double
description: Average jitter on local side.
local_stdevjitter:
type: number
format: double
description: Standard deviation jitter on local side.
txploss:
type: number
format: int32
description: Number of transmitted packets lost.
rxploss:
type: number
format: int32
description: Number of received packets lost.
remote_maxrxploss:
type: number
format: double
description: Maximum number of packets lost on remote side.
remote_minrxploss:
type: number
format: double
description: Minimum number of packets lost on remote side.
remote_normdevrxploss:
type: number
format: double
description: Average number of packets lost on remote side.
remote_stdevrxploss:
type: number
format: double
description: Standard deviation packets lost on remote side.
local_maxrxploss:
type: number
format: double
description: Maximum number of packets lost on local side.
local_minrxploss:
type: number
format: double
description: Minimum number of packets lost on local side.
local_normdevrxploss:
type: number
format: double
description: Average number of packets lost on local side.
local_stdevrxploss:
type: number
format: double
description: Standard deviation packets lost on local side.
rtt:
type: number
format: double
description: Total round trip time.
maxrtt:
type: number
format: double
description: Maximum round trip time.
minrtt:
type: number
format: double
description: Minimum round trip time.
normdevrtt:
type: number
format: double
description: Average round trip time.
stdevrtt:
type: number
format: double
description: Standard deviation round trip time.
local_ssrc:
type: number
format: int32
description: Our SSRC.
remote_ssrc:
type: number
format: int32
description: Their SSRC.
txoctetcount:
type: number
format: int32
description: Number of octets transmitted.
rxoctetcount:
type: number
format: int32
description: Number of octets received.
channel_uniqueid:
type: string
description: The Asterisk channel's unique ID that owns this instance.
required:
- txcount
- rxcount
- txploss
- rxploss
- local_ssrc
- remote_ssrc
- txoctetcount
- rxoctetcount
- channel_uniqueid
Channel:
type: object
description: A specific communication connection between Asterisk and an Endpoint.
properties:
id:
type: string
description:
|
Unique identifier of the channel. This is the same as the Uniqueid field in AMI.
protocol_id:
type: string
description: Protocol id from underlying channel driver (i.e. Call-ID for chan_pjsip; will be empty if not applicable or not implemented by driver).
name:
type: string
description: Name of the channel (i.e. SIP/foo-0000a7e3)
state:
type: string
enum:
- 'Down'
- 'Rsrved'
- 'OffHook'
- 'Dialing'
- 'Ring'
- 'Ringing'
- 'Up'
- 'Busy'
- 'Dialing Offhook'
- 'Pre-ring'
- 'Unknown'
caller:
$ref: '#/components/schemas/CallerID'
connected:
$ref: '#/components/schemas/CallerID'
accountcode:
type: string
dialplan:
$ref: '#/components/schemas/DialplanCEP'
creationtime:
type: string
format: date-time
description: Timestamp when channel was created
language:
type: string
description: The default spoken language
channelvars:
type: object
description: Channel variables
caller_rdnis:
type: string
description: The Caller ID RDNIS
tenantid:
type: string
description: The Tenant ID for the channel
required:
- id
- protocol_id
- name
- state
- accountcode
- creationtime
- language
Bridge:
type: object
description:
|
The merging of media from one or more channels. Everyone on the bridge receives the same audio.
properties:
id:
type: string
description: Unique identifier for this bridge
technology:
type: string
description: Name of the current bridging technology
bridge_type:
type: string
enum:
- 'mixing'
- 'holding'
description: Type of bridge technology
bridge_class:
type: string
description: Bridging class
creator:
type: string
description: Entity that created the bridge
name:
type: string
description: Name the creator gave the bridge
channels:
type: array
items:
type: string
description: Ids of channels participating in this bridge
video_mode:
type: string
description: The video mode the bridge is using. One of 'none', 'talker', 'sfu', or 'single'.
video_source_id:
type: string
description: The ID of the channel that is the source of video in this bridge, if one exists.
creationtime:
type: string
format: date-time
description: Timestamp when bridge was created
required:
- id
- technology
- bridge_type
- bridge_class
- creator
- name
- channels
- creationtime
StoredRecording:
type: object
description: A past recording that may be played back.
properties:
name:
type: string
format:
type: string
required:
- name
- format
LiveRecording:
type: object
description: A recording that is in progress
properties:
name:
type: string
description: Base name for the recording
format:
type: string
description: Recording format (wav, gsm, etc.)
target_uri:
type: string
description: URI for the channel or bridge being recorded
state:
type: string
enum:
- 'queued'
- 'recording'
- 'paused'
- 'done'
- 'failed'
- 'canceled'
duration:
type: number
format: int32
description: Duration in seconds of the recording
talking_duration:
type: number
format: int32
description: Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds.
silence_duration:
type: number
format: int32
description: Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds.
cause:
type: string
description: Cause for recording failure if failed
required:
- name
- format
- target_uri
- state
FormatLangPair:
type: object
description: Identifies the format and language of a sound file
properties:
language:
type: string
format:
type: string
required:
- language
- format
Sound:
type: object
description: A media file that may be played back.
properties:
id:
type: string
description: Sound's identifier.
text:
type: string
description: Text description of the sound, usually the words spoken.
formats:
type: array
items:
$ref: '#/components/schemas/FormatLangPair'
description: The formats and languages in which this sound is available.
required:
- id
- formats
Playback:
type: object
description: Object representing the playback of media to a channel
properties:
id:
type: string
description: ID for this playback operation
media_uri:
type: string
description: The URI for the media currently being played back.
next_media_uri:
type: string
description: If a list of URIs is being played, the next media URI to be played back.
target_uri:
type: string
description: URI for the channel or bridge to play the media on
language:
type: string
description: For media types that support multiple languages, the language requested for playback.
state:
type: string
enum:
- 'queued'
- 'playing'
- 'continuing'
- 'done'
- 'failed'
description: Current state of the playback operation.
required:
- id
- media_uri
- target_uri
- state
DeviceState:
type: object
description: Represents the state of a device.
properties:
name:
type: string
description: Name of the device.
state:
type: string
enum:
- 'UNKNOWN'
- 'NOT_INUSE'
- 'INUSE'
- 'BUSY'
- 'INVALID'
- 'UNAVAILABLE'
- 'RINGING'
- 'RINGINUSE'
- 'ONHOLD'
description: Device's state
required:
- name
- state
Mailbox:
type: object
description: Represents the state of a mailbox.
properties:
name:
type: string
description: Name of the mailbox.
old_messages:
type: number
format: int32
description: Count of old messages in the mailbox.
new_messages:
type: number
format: int32
description: Count of new messages in the mailbox.
required:
- name
- old_messages
- new_messages
Message:
type: object
description: Base type for errors and events
properties:
type:
type: string
description: Indicates the type of this message.
asterisk_id:
type: string
description: The unique ID for the Asterisk instance that raised this event.
required:
- type
MissingParams:
type: object
description: Error event sent when required params are missing.
properties:
params:
type: array
items:
type: string
description: A list of the missing parameters
required:
- params
Event:
type: object
description: Base type for asynchronous events from Asterisk.
properties:
application:
type: string
description: Name of the application receiving the event.
timestamp:
type: string
format: date-time
description: Time at which this event was created.
required:
- application
- timestamp
ContactInfo:
type: object
description: Detailed information about a contact on an endpoint.
properties:
uri:
type: string
description: The location of the contact.
contact_status:
type: string
enum:
- 'Unreachable'
- 'Reachable'
- 'Unknown'
- 'NonQualified'
- 'Removed'
description: The current status of the contact.
aor:
type: string
description: The Address of Record this contact belongs to.
roundtrip_usec:
type: string
description: Current round trip time, in microseconds, for the contact.
required:
- uri
- contact_status
- aor
Peer:
type: object
description: Detailed information about a remote peer that communicates with Asterisk.
properties:
peer_status:
type: string
description: The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.
cause:
type: string
description: An optional reason associated with the change in peer_status.
address:
type: string
description: The IP address of the peer.
port:
type: string
description: The port of the peer.
time:
type: string
description: The last known time the peer was contacted.
required:
- peer_status
DeviceStateChanged:
type: object
description: Notification that a device state has changed.
properties:
device_state:
$ref: '#/components/schemas/DeviceState'
PlaybackStarted:
type: object
description: Event showing the start of a media playback operation.
properties:
playback:
$ref: '#/components/schemas/Playback'
PlaybackContinuing:
type: object
description: Event showing the continuation of a media playback operation from one media URI to the next in the list.
properties:
playback:
$ref: '#/components/schemas/Playback'
PlaybackFinished:
type: object
description: Event showing the completion of a media playback operation.
properties:
playback:
$ref: '#/components/schemas/Playback'
RecordingStarted:
type: object
description: Event showing the start of a recording operation.
properties:
recording:
$ref: '#/components/schemas/LiveRecording'
RecordingFinished:
type: object
description: Event showing the completion of a recording operation.
properties:
recording:
$ref: '#/components/schemas/LiveRecording'
RecordingFailed:
type: object
description: Event showing failure of a recording operation.
properties:
recording:
$ref: '#/components/schemas/LiveRecording'
ApplicationMoveFailed:
type: object
description: Notification that trying to move a channel to another Stasis application failed.
properties:
channel:
$ref: '#/components/schemas/Channel'
destination:
type: string
args:
type: array
items:
type: string
description: Arguments to the application
required:
- destination
- args
ApplicationRegistered:
type: object
description: Notification that a Stasis app has been registered.
ApplicationUnregistered:
type: object
description: Notification that a Stasis app has been unregistered.
ApplicationReplaced:
type: object
description:
|
Notification that another WebSocket has taken over for an application. An application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.
BridgeCreated:
type: object
description: Notification that a bridge has been created.
properties:
bridge:
$ref: '#/components/schemas/Bridge'
BridgeDestroyed:
type: object
description: Notification that a bridge has been destroyed.
properties:
bridge:
$ref: '#/components/schemas/Bridge'
BridgeMerged:
type: object
description: Notification that one bridge has merged into another.
properties:
bridge:
$ref: '#/components/schemas/Bridge'
bridge_from:
$ref: '#/components/schemas/Bridge'
BridgeVideoSourceChanged:
type: object
description: Notification that the source of video in a bridge has changed.
properties:
bridge:
$ref: '#/components/schemas/Bridge'
old_video_source_id:
type: string
BridgeBlindTransfer:
type: object
description: Notification that a blind transfer has occurred.
properties:
channel:
$ref: '#/components/schemas/Channel'
replace_channel:
$ref: '#/components/schemas/Channel'
transferee:
$ref: '#/components/schemas/Channel'
exten:
type: string
description: The extension transferred to
context:
type: string
description: The context transferred to
result:
type: string
description: The result of the transfer attempt
is_external:
type: boolean
description: Whether the transfer was externally initiated or not
bridge:
$ref: '#/components/schemas/Bridge'
required:
- exten
- context
- result
- is_external
BridgeAttendedTransfer:
type: object
description: Notification that an attended transfer has occurred.
properties:
transferer_first_leg:
$ref: '#/components/schemas/Channel'
transferer_second_leg:
$ref: '#/components/schemas/Channel'
replace_channel:
$ref: '#/components/schemas/Channel'
transferee:
$ref: '#/components/schemas/Channel'
transfer_target:
$ref: '#/components/schemas/Channel'
result:
type: string
description: The result of the transfer attempt
is_external:
type: boolean
description: Whether the transfer was externally initiated or not
transferer_first_leg_bridge:
$ref: '#/components/schemas/Bridge'
transferer_second_leg_bridge:
$ref: '#/components/schemas/Bridge'
destination_type:
type: string
description: How the transfer was accomplished
destination_bridge:
type: string
description: Bridge that survived the merge result
destination_application:
type: string
description: Application that has been transferred into
destination_link_first_leg:
$ref: '#/components/schemas/Channel'
destination_link_second_leg:
$ref: '#/components/schemas/Channel'
destination_threeway_channel:
$ref: '#/components/schemas/Channel'
destination_threeway_bridge:
$ref: '#/components/schemas/Bridge'
required:
- result
- is_external
- destination_type
ChannelCreated:
type: object
description: Notification that a channel has been created.
properties:
channel:
$ref: '#/components/schemas/Channel'
ChannelDestroyed:
type: object
description: Notification that a channel has been destroyed.
properties:
cause:
type: number
format: int32
description: Integer representation of the cause of the hangup
cause_txt:
type: string
description: Text representation of the cause of the hangup
tech_cause:
type: number
format: int32
description: Integer representation of the technology-specific off-nominal cause of the hangup.
channel:
$ref: '#/components/schemas/Channel'
required:
- cause
- cause_txt
ChannelEnteredBridge:
type: object
description: Notification that a channel has entered a bridge.
properties:
bridge:
$ref: '#/components/schemas/Bridge'
channel:
$ref: '#/components/schemas/Channel'
ChannelLeftBridge:
type: object
description: Notification that a channel has left a bridge.
properties:
bridge:
$ref: '#/components/schemas/Bridge'
channel:
$ref: '#/components/schemas/Channel'
ChannelStateChange:
type: object
description: Notification of a channel's state change.
properties:
channel:
$ref: '#/components/schemas/Channel'
ChannelDtmfReceived:
type: object
description:
|
DTMF received on a channel. This event is sent when the DTMF ends. There is no notification about the start of DTMF
properties:
digit:
type: string
description: DTMF digit received (0-9, A-E, # or *)
duration_ms:
type: number
format: int32
description: Number of milliseconds DTMF was received
channel:
$ref: '#/components/schemas/Channel'
required:
- digit
- duration_ms
ChannelDialplan:
type: object
description: Channel changed location in the dialplan.
properties:
channel:
$ref: '#/components/schemas/Channel'
dialplan_app:
type: string
description: The application about to be executed.
dialplan_app_data:
type: string
description: The data to be passed to the application.
required:
- dialplan_app
- dialplan_app_data
ChannelCallerId:
type: object
description: Channel changed Caller ID.
properties:
caller_presentation:
type: number
format: int32
description: The integer representation of the Caller Presentation value.
caller_presentation_txt:
type: string
description: The text representation of the Caller Presentation value.
channel:
$ref: '#/components/schemas/Channel'
required:
- caller_presentation
- caller_presentation_txt
ChannelUserevent:
type: object
description: User-generated event with additional user-defined fields in the object.
properties:
eventname:
type: string
description: The name of the user event.
channel:
$ref: '#/components/schemas/Channel'
bridge:
$ref: '#/components/schemas/Bridge'
endpoint:
$ref: '#/components/schemas/Endpoint'
userevent:
type: object
description: Custom Userevent data
required:
- eventname
- userevent
ChannelHangupRequest:
type: object
description: A hangup was requested on the channel.
properties:
cause:
type: number
format: int32
description: Integer representation of the cause of the hangup.
tech_cause:
type: number
format: int32
description: Integer representation of the technology-specific off-nominal cause of the hangup.
soft:
type: boolean
description: Whether the hangup request was a soft hangup request.
channel:
$ref: '#/components/schemas/Channel'
ChannelVarset:
type: object
description: Channel variable changed.
properties:
variable:
type: string
description: The variable that changed.
value:
type: string
description: The new value of the variable.
channel:
$ref: '#/components/schemas/Channel'
required:
- variable
- value
ChannelHold:
type: object
description: A channel initiated a media hold.
properties:
channel:
$ref: '#/components/schemas/Channel'
musicclass:
type: string
description: The music on hold class that the initiator requested.
ChannelUnhold:
type: object
description: A channel initiated a media unhold.
properties:
channel:
$ref: '#/components/schemas/Channel'
ChannelToneDetected:
type: object
description: Tone was detected on the channel.
properties:
channel:
$ref: '#/components/schemas/Channel'
ChannelTalkingStarted:
type: object
description: Talking was detected on the channel.
properties:
channel:
$ref: '#/components/schemas/Channel'
ChannelTalkingFinished:
type: object
description: Talking is no longer detected on the channel.
properties:
channel:
$ref: '#/components/schemas/Channel'
duration:
type: number
format: int32
description: The length of time, in milliseconds, that talking was detected on the channel
required:
- duration
ContactStatusChange:
type: object
description: The state of a contact on an endpoint has changed.
properties:
endpoint:
$ref: '#/components/schemas/Endpoint'
contact_info:
$ref: '#/components/schemas/ContactInfo'
PeerStatusChange:
type: object
description: The state of a peer associated with an endpoint has changed.
properties:
endpoint:
$ref: '#/components/schemas/Endpoint'
peer:
$ref: '#/components/schemas/Peer'
EndpointStateChange:
type: object
description: Endpoint state changed.
properties:
endpoint:
$ref: '#/components/schemas/Endpoint'
Dial:
type: object
description: Dialing state has changed.
properties:
caller:
$ref: '#/components/schemas/Channel'
peer:
$ref: '#/components/schemas/Channel'
forward:
type: string
description: Forwarding target requested by the original dialed channel.
forwarded:
$ref: '#/components/schemas/Channel'
dialstring:
type: string
description: The dial string for calling the peer channel.
dialstatus:
type: string
description: Current status of the dialing attempt to the peer.
required:
- dialstatus
StasisEnd:
type: object
description: Notification that a channel has left a Stasis application.
properties:
channel:
$ref: '#/components/schemas/Channel'
StasisStart:
type: object
description: Notification that a channel has entered a Stasis application.
properties:
args:
type: array
items:
type: string
description: Arguments to the application
channel:
$ref: '#/components/schemas/Channel'
replace_channel:
$ref: '#/components/schemas/Channel'
required:
- args
TextMessageReceived:
type: object
description: A text message was received from an endpoint.
properties:
message:
$ref: '#/components/schemas/TextMessage'
endpoint:
$ref: '#/components/schemas/Endpoint'
ChannelConnectedLine:
type: object
description: Channel changed Connected Line.
properties:
channel:
$ref: '#/components/schemas/Channel'
ChannelTransfer:
type: object
description: transfer on a channel.
properties:
state:
type: string
description: Transfer State
refer_to:
$ref: '#/components/schemas/ReferTo'
referred_by:
$ref: '#/components/schemas/ReferredBy'
ReferTo:
type: object
description: transfer destination requested by transferee
properties:
requested_destination:
$ref: '#/components/schemas/RequiredDestination'
destination_channel:
$ref: '#/components/schemas/Channel'
connected_channel:
$ref: '#/components/schemas/Channel'
bridge:
$ref: '#/components/schemas/Bridge'
ReferredBy:
type: object
description: transfer destination requested by transferee
properties:
source_channel:
$ref: '#/components/schemas/Channel'
connected_channel:
$ref: '#/components/schemas/Channel'
bridge:
$ref: '#/components/schemas/Bridge'
RequiredDestination:
type: object
description: Information about the requested destination
properties:
protocol_id:
type: string
description: the requested protocol-id by the referee in case of SIP channel, this is a SIP Call ID, Mutually exclusive to destination
destination:
type: string
description: Destination User Part. Only for Blind transfer. Mutually exclusive to protocol_id
additional_protocol_params:
type: array
items:
$ref: '#/components/schemas/AdditionalParam'
description: List of additional protocol specific information
AdditionalParam:
type: object
description: Protocol specific additional parameter
properties:
parameter_name:
type: string
description: Name of the parameter
parameter_value:
type: string
description: Value of the parameter
required:
- parameter_name
- parameter_value
RESTHeader:
type: object
description: REST over Websocket header
properties:
name:
type: string
description: Header name
value:
type: string
description: Header value
required:
- name
- value
RESTQueryStringParameter:
type: object
description: REST over Websocket Query String Parameter
properties:
name:
type: string
description: Parameter name
value:
type: string
description: Parameter value
required:
- name
- value
RESTRequest:
type: object
description: REST over Websocket Request.
properties:
type:
type: string
description: Message type. Must be 'RESTRequest'
transaction_id:
type: string
description: Opaque transaction id. Can be any valid string. Will be returned in any response to this request.
request_id:
type: string
description: Opaque request id. Can be any valid string. Will be returned in any response to this request.
method:
type: string
description: HTTP method (GET, PUT, POST, DELETE, etc.)
uri:
type: string
description: Resource URI with optional query string parameters.
content_type:
type: string
description: The Content-Type of the message body.
query_strings:
type: array
items:
$ref: '#/components/schemas/RESTQueryStringParameter'
description: Request query string parameters.
message_body:
type: string
description: Request message body. Only content types application/json and application/x-www-form-urlencoded are supported.
required:
- type
- transaction_id
- request_id
- method
- uri
RESTResponse:
type: object
description: REST over Websocket Response.
properties:
transaction_id:
type: string
description: Opaque transaction id. Will be whatever was specified on the original request.
request_id:
type: string
description: Opaque request id. Will be whatever was specified on the original request.
status_code:
type: number
format: int32
description: HTTP status code
reason_phrase:
type: string
description: HTTP reason phrase
uri:
type: string
description: Original request resource URI
content_type:
type: string
description: The Content-Type of the message body.
message_body:
type: string
description: Response message body
required:
- transaction_id
- request_id
- status_code
- reason_phrase
- uri
Application:
type: object
description: Details of a Stasis application
properties:
name:
type: string
description: Name of this application
channel_ids:
type: array
items:
type: string
description: Id's for channels subscribed to.
bridge_ids:
type: array
items:
type: string
description: Id's for bridges subscribed to.
endpoint_ids:
type: array
items:
type: string
description: "{tech}/{resource} for endpoints subscribed to."
device_names:
type: array
items:
type: string
description: Names of the devices subscribed to.
events_allowed:
type: array
items:
type: object
description: Event types sent to the application.
events_disallowed:
type: array
items:
type: object
description: Event types not sent to the application.
required:
- name
- channel_ids
- bridge_ids
- endpoint_ids
- device_names
- events_allowed
- events_disallowed
VariableBag:
type: object
properties:
variables:
type: object
required:
- variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment