class Asterisk::ARI::Asterisk
- Asterisk::ARI::Asterisk
- Asterisk::ARI::Resources
- Reference
- Object
Defined in:
asterisk/ari/resources/asterisk.crasterisk/ari/models/asterisk_asterisk_info.cr
asterisk/ari/models/asterisk_asterisk_ping.cr
asterisk/ari/models/asterisk_build_info.cr
asterisk/ari/models/asterisk_config_info.cr
asterisk/ari/models/asterisk_config_tuple.cr
asterisk/ari/models/asterisk_log_channel.cr
asterisk/ari/models/asterisk_module.cr
asterisk/ari/models/asterisk_set_id.cr
asterisk/ari/models/asterisk_status_info.cr
asterisk/ari/models/asterisk_system_info.cr
asterisk/ari/models/asterisk_variable.cr
Instance Method Summary
-
#add_log(log_channel_name : String, configuration : String)
Adds a log channel.
-
#delete_log(log_channel_name : String)
Deletes a log channel.
-
#delete_object(config_class : String, object_type : String, id : String)
Delete a dynamic configuration object.
-
#get_global_var(variable : String) : HTTP::Client::Response | Asterisk::Variable
Get the value of a global variable.
-
#get_info(only : String? = nil) : HTTP::Client::Response | Asterisk::AsteriskInfo
Gets Asterisk system information.
-
#get_module(module_name : String) : HTTP::Client::Response | Asterisk::Module
Get Asterisk module information.
-
#get_object(config_class : String, object_type : String, id : String) : HTTP::Client::Response | Array(Asterisk::ConfigTuple)
Retrieve a dynamic configuration object.
-
#list_log_channels : HTTP::Client::Response | Array(Asterisk::LogChannel)
Gets Asterisk log channel information.
-
#list_modules : HTTP::Client::Response | Array(Asterisk::Module)
List Asterisk modules.
-
#load_module(module_name : String)
Load an Asterisk module.
-
#ping : HTTP::Client::Response | Asterisk::AsteriskPing
Response pong message.
-
#reload_module(module_name : String)
Reload an Asterisk module.
-
#rotate_log(log_channel_name : String)
Rotates a log channel.
-
#set_global_var(variable : String, value : String? = nil)
Set the value of a global variable.
-
#unload_module(module_name : String)
Unload an Asterisk module.
-
#update_object(config_class : String, object_type : String, id : String, fields : Hash(String, String | Bool | Int32 | Float32)? = nil) : HTTP::Client::Response | Array(Asterisk::ConfigTuple)
Create or update a dynamic configuration object.
Instance methods inherited from class Asterisk::ARI::Resources
ari : ARI
ari
Constructor methods inherited from class Asterisk::ARI::Resources
new(ari)
new
Instance Method Detail
Adds a log channel.
Arguments:
log_channel_name
- the log channel to add. (required);configuration
- levels of the log channel. (required);
Error responses:
- 400 - Bad request body
- 409 - Log channel could not be created.
Deletes a log channel.
Arguments:
log_channel_name
- log channels name. (required);
Error responses:
- 404 - Log channel does not exist.
Delete a dynamic configuration object.
Arguments:
config_class
- the configuration class containing dynamic configuration objects. (required);object_type
- the type of configuration object to delete. (required);id
- the unique identifier of the object to delete. (required);
Error responses:
- 403 - Could not delete object
- 404 - {configClass|objectType|id} not found
Get the value of a global variable.
Arguments:
variable
- the variable to get. (required);
Error responses:
- 400 - Missing variable parameter.
Gets Asterisk system information.
Arguments:
only
- filter information returned.. Allow multiple instances (comma-separated list);
Get Asterisk module information.
Arguments:
module_name
- module's name. (required);
Error responses:
- 404 - Module could not be found in running modules.
- 409 - Module information could not be retrieved.
Retrieve a dynamic configuration object.
Arguments:
config_class
- the configuration class containing dynamic configuration objects. (required);object_type
- the type of configuration object to retrieve. (required);id
- the unique identifier of the object to retrieve. (required);
Error responses:
- 404 - {configClass|objectType|id} not found
Gets Asterisk log channel information.
Load an Asterisk module.
Arguments:
module_name
- module's name. (required);
Error responses:
- 409 - Module could not be loaded.
Reload an Asterisk module.
Arguments:
module_name
- module's name. (required);
Error responses:
- 404 - Module not found in running modules.
- 409 - Module could not be reloaded.
Rotates a log channel.
Arguments:
log_channel_name
- log channel's name. (required);
Error responses:
- 404 - Log channel does not exist.
Set the value of a global variable.
Arguments:
variable
- the variable to set. (required);value
- the value to set the variable to;
Error responses:
- 400 - Missing variable parameter.
Unload an Asterisk module.
Arguments:
module_name
- module's name. (required);
Error responses:
- 404 - Module not found in running modules.
- 409 - Module could not be unloaded.
Create or update a dynamic configuration object.
Arguments:
config_class
- the configuration class containing dynamic configuration objects. (required);object_type
- the type of configuration object to create or update. (required);id
- the unique identifier of the object to create or update. (required);fields
- the body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { "attribute": "directmedia", "value": "false" } ];
Error responses:
- 400 - Bad request body
- 403 - Could not create or update object
- 404 - {configClass|objectType} not found