class Asterisk::ARI::Applications

Defined in:

asterisk/ari/resources/applications.cr
asterisk/ari/models/applications_application.cr

Instance Method Summary

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

def filter(application_name : String, filter : Hash(String, String | Bool | Int32 | Float32)? = nil) : HTTP::Client::Response | Applications::Application #

Filter application events types.

Arguments:

  • application_name - application's name. (required);
  • #filter - specify which event types to allow/disallow;

Error responses:

  • 400 - Bad request.
  • 404 - Application does not exist.

[View source]
def get(application_name : String) : HTTP::Client::Response | Applications::Application #

Get details of an application.

Arguments:

  • application_name - application's name. (required);

Error responses:

  • 404 - Application does not exist.

[View source]
def list : HTTP::Client::Response | Array(Applications::Application) #

List all applications.


[View source]
def subscribe(application_name : String, event_source : String) : HTTP::Client::Response | Applications::Application #

Subscribe an application to a event source.

Arguments:

  • application_name - application's name. (required);
  • event_source - uRI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}. (required). Allow multiple instances (comma-separated list);

Error responses:

  • 400 - Missing parameter.
  • 404 - Application does not exist.
  • 422 - Event source does not exist.

[View source]
def unsubscribe(application_name : String, event_source : String) : HTTP::Client::Response | Applications::Application #

Unsubscribe an application from an event source.

Arguments:

  • application_name - application's name. (required);
  • event_source - uRI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}. (required). Allow multiple instances (comma-separated list);

Error responses:

  • 400 - Missing parameter; event source scheme not recognized.
  • 404 - Application does not exist.
  • 409 - Application not subscribed to event source.
  • 422 - Event source does not exist.

[View source]