class Asterisk::AMI

Defined in:

asterisk/ami/response.cr
asterisk/ami/event.cr
asterisk/ami.cr

Constant Summary

WAIT_FOR_ANSWER = 0.0005

Constructors

Instance Method Summary

Constructor Detail

def self.new(host = "127.0.0.1", port : String | Int32 = 5038, username = "", secret = "", logger : Logger = Asterisk.logger) #

[View source]

Instance Method Detail

def ami_version : String? #

[View source]
def asterisk_platform : String? #

[View source]
def asterisk_version : String? #

[View source]
def command(command : String) : String | Array(String) #

[View source]
def connect #

[View source]
def connected? #

[View source]
def logger : Logger #

[View source]
def login #

[View source]
def logoff #

[View source]
def on_close(&on_close : AMI -> ) #

on_close callback


[View source]
def on_event(event : EventName, &block : AMI, Event -> ) #

on_event callback (event name, AMI instance, event body)


[View source]
def send_action(action : AMIData, expects_answer_before : Float64 = 0.3) #

[View source]
def send_action!(action : AMIData) #

send action asynchronously


[View source]
def start #

[View source]