OSTIP_EXARI v0.1.0 Swagger.Client.Api.ApiDocschannelsFormat View Source
API calls for all endpoints tagged ApiDocschannelsFormat.
Link to this section Summary
Functions
Answer a channel
Exit application; continue execution in the dialplan
Create channel
Dial a created channel
Channel details
Get the value of a channel variable or function
Delete (i.e. hangup) a channel
Hold a channel
List all active channels in Asterisk
Mute a channel
Create a new channel (originate). The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates
Create a new channel (originate with id). The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates
Start playback of media. The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
Start playback of media and specify the playbackId. The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
Start a recording. Record audio from a channel. Note that this will not capture audio sent to the channel. The bridge itself has a record feature if that's what you want
Redirect the channel to a different location
Indicate ringing to a channel
Stop ringing indication on a channel if locally generated
Send provided DTMF to a given channel
Set the value of a channel variable or function
Start snooping. Snoop (spy/whisper) on a specific channel
Start snooping. Snoop (spy/whisper) on a specific channel
Play music on hold to a channel. Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold
Play silence to a channel. Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically
Stop playing music on hold to a channel
Stop playing silence to a channel
Remove a channel from hold
Unmute a channel
Link to this section Functions
answer(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Answer a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
continue_in_dialplan(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Exit application; continue execution in the dialplan.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :context (String.t): The context to continue to.
- :extension (String.t): The extension to continue to.
- :priority (integer()): The priority to continue to.
- :label (String.t): The label to continue to - will supersede 'priority' if both are provided.
Returns
{:ok, %{}} on success {:error, info} on failure
create(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Create channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- endpoint (String.t): Endpoint for channel communication
- app (String.t): Stasis Application to place channel into
opts (KeywordList): [optional] Optional parameters
- :app_args (String.t): The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
- :channel_id (String.t): The unique id to assign the channel on creation.
- :other_channel_id (String.t): The unique id to assign the second channel when using local channels.
- :originator (String.t): Unique ID of the calling channel
- :formats (String.t): The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs".
Returns
{:ok, %{}} on success {:error, info} on failure
dial(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Dial a created channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :caller (String.t): Channel ID of caller
- :timeout (integer()): Dial timeout
Returns
{:ok, %{}} on success {:error, info} on failure
get(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Channel details.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
get_channel_var(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Get the value of a channel variable or function.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- variable (String.t): The channel variable or function to get
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
hangup(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete (i.e. hangup) a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :reason (String.t): Reason for hanging up the channel
Returns
{:ok, %{}} on success {:error, info} on failure
hold(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Hold a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
list(Tesla.Env.client(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
List all active channels in Asterisk.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
mute(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Mute a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :direction (String.t): Direction in which to mute audio
Returns
{:ok, %{}} on success {:error, info} on failure
originate(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Create a new channel (originate). The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- endpoint (String.t): Endpoint to call.
opts (KeywordList): [optional] Optional parameters
- :extension (String.t): The extension to dial after the endpoint answers. Mutually exclusive with 'app'.
- :context (String.t): The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.
- :priority (integer()): The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.
- :label (String.t): The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.
- :app (String.t): 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'.
- :app_args (String.t): The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
- :caller_id (String.t): CallerID to use when dialing the endpoint or extension.
- :timeout (integer()): Timeout (in seconds) before giving up dialing, or -1 for no timeout.
- :variables (Containers): 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" } }
- :channel_id (String.t): The unique id to assign the channel on creation.
- :other_channel_id (String.t): The unique id to assign the second channel when using local channels.
- :originator (String.t): The unique id of the channel which is originating this one.
- :formats (String.t): The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs".
Returns
{:ok, %{}} on success {:error, info} on failure
originate_with_id(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Create a new channel (originate with id). The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): The unique id to assign the channel on creation.
- endpoint (String.t): Endpoint to call.
opts (KeywordList): [optional] Optional parameters
- :extension (String.t): The extension to dial after the endpoint answers. Mutually exclusive with 'app'.
- :context (String.t): The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.
- :priority (integer()): The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.
- :label (String.t): The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.
- :app (String.t): 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'.
- :app_args (String.t): The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.
- :caller_id (String.t): CallerID to use when dialing the endpoint or extension.
- :timeout (integer()): Timeout (in seconds) before giving up dialing, or -1 for no timeout.
- :variables (Containers): 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" } }
- :other_channel_id (String.t): The unique id to assign the second channel when using local channels.
- :originator (String.t): The unique id of the channel which is originating this one.
- :formats (String.t): The format name capability list to use if originator is not specified. Ex. "ulaw,slin16". Format names can be found with "core show codecs".
Returns
{:ok, %{}} on success {:error, info} on failure
play(Tesla.Env.client(), String.t(), [String.t()], keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Start playback of media. The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- media ([String.t]): Media URIs to play.
opts (KeywordList): [optional] Optional parameters
- :lang (String.t): For sounds, selects language for sound.
- :offsetms (integer()): Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.
- :skipms (integer()): Number of milliseconds to skip for forward/reverse operations.
- :playback_id (String.t): Playback ID.
Returns
{:ok, %{}} on success {:error, info} on failure
play_with_id( Tesla.Env.client(), String.t(), String.t(), [String.t()], keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
Start playback of media and specify the playbackId. The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- playback_id (String.t): Playback ID.
- media ([String.t]): Media URIs to play.
opts (KeywordList): [optional] Optional parameters
- :lang (String.t): For sounds, selects language for sound.
- :offsetms (integer()): Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.
- :skipms (integer()): Number of milliseconds to skip for forward/reverse operations.
Returns
{:ok, %{}} on success {:error, info} on failure
record(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Start a recording. Record audio from a channel. Note that this will not capture audio sent to the channel. The bridge itself has a record feature if that's what you want.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- name (String.t): Recording's filename
- format (String.t): Format to encode audio in
opts (KeywordList): [optional] Optional parameters
- :max_duration_seconds (integer()): Maximum duration of the recording, in seconds. 0 for no limit
- :max_silence_seconds (integer()): Maximum duration of silence, in seconds. 0 for no limit
- :if_exists (String.t): Action to take if a recording with the same name already exists.
- :beep (boolean()): Play beep when recording begins
- :terminate_on (String.t): DTMF input to terminate recording
Returns
{:ok, %{}} on success {:error, info} on failure
redirect(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Redirect the channel to a different location.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- endpoint (String.t): The endpoint to redirect the channel to
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
ring(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Indicate ringing to a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
ring_stop(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Stop ringing indication on a channel if locally generated.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
send_dtmf(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Send provided DTMF to a given channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :dtmf (String.t): DTMF To send.
- :before (integer()): Amount of time to wait before DTMF digits (specified in milliseconds) start.
- :between (integer()): Amount of time in between DTMF digits (specified in milliseconds).
- :duration (integer()): Length of each DTMF digit (specified in milliseconds).
- :after (integer()): Amount of time to wait after DTMF digits (specified in milliseconds) end.
Returns
{:ok, %{}} on success {:error, info} on failure
set_channel_var(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Set the value of a channel variable or function.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- variable (String.t): The channel variable or function to set
opts (KeywordList): [optional] Optional parameters
- :value (String.t): The value to set the variable to
Returns
{:ok, %{}} on success {:error, info} on failure
snoop_channel(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Start snooping. Snoop (spy/whisper) on a specific channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- app (String.t): Application the snooping channel is placed into
opts (KeywordList): [optional] Optional parameters
- :spy (String.t): Direction of audio to spy on
- :whisper (String.t): Direction of audio to whisper into
- :app_args (String.t): The application arguments to pass to the Stasis application
- :snoop_id (String.t): Unique ID to assign to snooping channel
Returns
{:ok, %{}} on success {:error, info} on failure
snoop_channel_with_id( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
Start snooping. Snoop (spy/whisper) on a specific channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- snoop_id (String.t): Unique ID to assign to snooping channel
- app (String.t): Application the snooping channel is placed into
opts (KeywordList): [optional] Optional parameters
- :spy (String.t): Direction of audio to spy on
- :whisper (String.t): Direction of audio to whisper into
- :app_args (String.t): The application arguments to pass to the Stasis application
Returns
{:ok, %{}} on success {:error, info} on failure
start_moh(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Play music on hold to a channel. Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :moh_class (String.t): Music on hold class to use
Returns
{:ok, %{}} on success {:error, info} on failure
start_silence(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Play silence to a channel. Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
stop_moh(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Stop playing music on hold to a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
stop_silence(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Stop playing silence to a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
unhold(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Remove a channel from hold.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
unmute(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Unmute a channel.
Parameters
- connection (Swagger.Client.Connection): Connection to server
- channel_id (String.t): Channel's id
opts (KeywordList): [optional] Optional parameters
- :direction (String.t): Direction in which to unmute audio
Returns
{:ok, %{}} on success {:error, info} on failure