Class Adhearsion::Call
In: lib/adhearsion/voip/call.rb
Parent: Object

Encapsulates call-related data and behavior. For example, variables passed in on call initiation are accessible here as attributes

Methods

Classes and Modules

Module Adhearsion::Call::Variables

Constants

ASTERISK_FRAME_STATES = [ :failure, # "Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)" :hangup, # Other end has hungup :ring, # Local ring :ringing, # Remote end is ringing :answer, # Remote end has answered :busy, # Remote end is busy :takeoffhook, # Make it go off hook :offhook, # Line is off hook :congestion, # Congestion (circuits busy) :flash, # Flash hook :wink, # Wink :option, # Set a low-level option :radio_key, # Key Radio :radio_unkey, # Un-Key Radio :progress, # Indicate PROGRESS :proceeding, # Indicate CALL PROCEEDING :hold, # Indicate call is placed on hold :unhold, # Indicate call is left from hold :vidupdate   This is basically a translation of ast_channel_reason2str() from main/channel.c and ast_control_frame_type in include/asterisk/frame.h in the Asterisk source code. When Asterisk jumps to the ‘failed’ extension, it sets a REASON channel variable to a number. The indexes of these symbols represent the possible numbers REASON could be.

Attributes

io  [RW] 
originating_voip_platform  [RW] 
type  [RW] 
variables  [RW] 

Public Class methods

The primary public interface for creating a Call instance. Given an IO (probably a socket accepted from an Asterisk service), creates a Call instance which encapsulates everything we know about that call.

Public Instance methods

Asterisk sometimes uses the "failed" extension to indicate a failed dial attempt. Since it may be important to handle these, this flag helps the dialplan Manager figure that out.

[Validate]