2008-04-25 22:12:01 +00:00
|
|
|
# This file was automatically generated by SWIG (http://www.swig.org).
|
|
|
|
# Version 1.3.35
|
|
|
|
#
|
|
|
|
# Don't modify this file, modify the SWIG interface instead.
|
|
|
|
|
|
|
|
package freeswitch;
|
|
|
|
require Exporter;
|
|
|
|
@ISA = qw(Exporter);
|
|
|
|
package freeswitchc;
|
|
|
|
boot_freeswitch();
|
|
|
|
package freeswitch;
|
|
|
|
@EXPORT = qw( );
|
|
|
|
|
|
|
|
# ---------- BASE METHODS -------------
|
|
|
|
|
|
|
|
package freeswitch;
|
|
|
|
|
|
|
|
sub TIEHASH {
|
|
|
|
my ($classname,$obj) = @_;
|
|
|
|
return bless $obj, $classname;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub CLEAR { }
|
|
|
|
|
|
|
|
sub FIRSTKEY { }
|
|
|
|
|
|
|
|
sub NEXTKEY { }
|
|
|
|
|
|
|
|
sub FETCH {
|
|
|
|
my ($self,$field) = @_;
|
|
|
|
my $member_func = "swig_${field}_get";
|
|
|
|
$self->$member_func();
|
|
|
|
}
|
|
|
|
|
|
|
|
sub STORE {
|
|
|
|
my ($self,$field,$newval) = @_;
|
|
|
|
my $member_func = "swig_${field}_set";
|
|
|
|
$self->$member_func($newval);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub this {
|
|
|
|
my $ptr = shift;
|
|
|
|
return tied(%$ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# ------- FUNCTION WRAPPERS --------
|
|
|
|
|
|
|
|
package freeswitch;
|
|
|
|
|
2008-04-30 23:42:37 +00:00
|
|
|
*consoleLog = *freeswitchc::consoleLog;
|
|
|
|
*consoleCleanLog = *freeswitchc::consoleCleanLog;
|
2008-04-25 22:12:01 +00:00
|
|
|
*console_log = *freeswitchc::console_log;
|
|
|
|
*console_clean_log = *freeswitchc::console_clean_log;
|
|
|
|
*bridge = *freeswitchc::bridge;
|
|
|
|
*hanguphook = *freeswitchc::hanguphook;
|
|
|
|
*dtmf_callback = *freeswitchc::dtmf_callback;
|
2008-04-30 23:42:37 +00:00
|
|
|
|
2008-05-02 16:43:54 +00:00
|
|
|
############# Class : freeswitch::IVRMenu ##############
|
|
|
|
|
|
|
|
package freeswitch::IVRMenu;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_IVRMenu(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_IVRMenu($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*bindAction = *freeswitchc::IVRMenu_bindAction;
|
|
|
|
*execute = *freeswitchc::IVRMenu_execute;
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-30 23:42:37 +00:00
|
|
|
############# Class : freeswitch::API ##############
|
|
|
|
|
|
|
|
package freeswitch::API;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_API(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_API($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*execute = *freeswitchc::API_execute;
|
|
|
|
*executeString = *freeswitchc::API_executeString;
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
2008-04-25 22:12:01 +00:00
|
|
|
|
|
|
|
############# Class : freeswitch::input_callback_state_t ##############
|
|
|
|
|
|
|
|
package freeswitch::input_callback_state_t;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
*swig_function_get = *freeswitchc::input_callback_state_t_function_get;
|
|
|
|
*swig_function_set = *freeswitchc::input_callback_state_t_function_set;
|
|
|
|
*swig_threadState_get = *freeswitchc::input_callback_state_t_threadState_get;
|
|
|
|
*swig_threadState_set = *freeswitchc::input_callback_state_t_threadState_set;
|
|
|
|
*swig_extra_get = *freeswitchc::input_callback_state_t_extra_get;
|
|
|
|
*swig_extra_set = *freeswitchc::input_callback_state_t_extra_set;
|
|
|
|
*swig_funcargs_get = *freeswitchc::input_callback_state_t_funcargs_get;
|
|
|
|
*swig_funcargs_set = *freeswitchc::input_callback_state_t_funcargs_set;
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_input_callback_state_t(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_input_callback_state_t($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-11 19:42:52 +00:00
|
|
|
############# Class : freeswitch::DTMF ##############
|
|
|
|
|
|
|
|
package freeswitch::DTMF;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
*swig_digit_get = *freeswitchc::DTMF_digit_get;
|
|
|
|
*swig_digit_set = *freeswitchc::DTMF_digit_set;
|
|
|
|
*swig_duration_get = *freeswitchc::DTMF_duration_get;
|
|
|
|
*swig_duration_set = *freeswitchc::DTMF_duration_set;
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_DTMF(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_DTMF($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-25 22:12:01 +00:00
|
|
|
############# Class : freeswitch::Stream ##############
|
|
|
|
|
|
|
|
package freeswitch::Stream;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_Stream(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_Stream($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*write = *freeswitchc::Stream_write;
|
|
|
|
*get_data = *freeswitchc::Stream_get_data;
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
############# Class : freeswitch::Event ##############
|
|
|
|
|
|
|
|
package freeswitch::Event;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
2008-04-29 23:34:26 +00:00
|
|
|
*swig_event_get = *freeswitchc::Event_event_get;
|
|
|
|
*swig_event_set = *freeswitchc::Event_event_set;
|
|
|
|
*swig_serialized_string_get = *freeswitchc::Event_serialized_string_get;
|
|
|
|
*swig_serialized_string_set = *freeswitchc::Event_serialized_string_set;
|
|
|
|
*swig_mine_get = *freeswitchc::Event_mine_get;
|
|
|
|
*swig_mine_set = *freeswitchc::Event_mine_set;
|
2008-04-25 22:12:01 +00:00
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_Event(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_Event($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
*serialize = *freeswitchc::Event_serialize;
|
2008-04-30 19:42:26 +00:00
|
|
|
*setPriority = *freeswitchc::Event_setPriority;
|
|
|
|
*getHeader = *freeswitchc::Event_getHeader;
|
|
|
|
*getBody = *freeswitchc::Event_getBody;
|
|
|
|
*getType = *freeswitchc::Event_getType;
|
|
|
|
*addBody = *freeswitchc::Event_addBody;
|
|
|
|
*addHeader = *freeswitchc::Event_addHeader;
|
|
|
|
*delHeader = *freeswitchc::Event_delHeader;
|
2008-04-25 22:12:01 +00:00
|
|
|
*fire = *freeswitchc::Event_fire;
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-02 21:12:57 +00:00
|
|
|
############# Class : freeswitch::EventConsumer ##############
|
|
|
|
|
|
|
|
package freeswitch::EventConsumer;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
*swig_events_get = *freeswitchc::EventConsumer_events_get;
|
|
|
|
*swig_events_set = *freeswitchc::EventConsumer_events_set;
|
|
|
|
*swig_e_event_id_get = *freeswitchc::EventConsumer_e_event_id_get;
|
|
|
|
*swig_e_event_id_set = *freeswitchc::EventConsumer_e_event_id_set;
|
|
|
|
*swig_node_get = *freeswitchc::EventConsumer_node_get;
|
|
|
|
*swig_node_set = *freeswitchc::EventConsumer_node_set;
|
|
|
|
*swig_e_callback_get = *freeswitchc::EventConsumer_e_callback_get;
|
|
|
|
*swig_e_callback_set = *freeswitchc::EventConsumer_e_callback_set;
|
|
|
|
*swig_e_subclass_name_get = *freeswitchc::EventConsumer_e_subclass_name_get;
|
|
|
|
*swig_e_subclass_name_set = *freeswitchc::EventConsumer_e_subclass_name_set;
|
|
|
|
*swig_e_cb_arg_get = *freeswitchc::EventConsumer_e_cb_arg_get;
|
|
|
|
*swig_e_cb_arg_set = *freeswitchc::EventConsumer_e_cb_arg_set;
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_EventConsumer(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_EventConsumer($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*pop = *freeswitchc::EventConsumer_pop;
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-25 22:12:01 +00:00
|
|
|
############# Class : freeswitch::CoreSession ##############
|
|
|
|
|
|
|
|
package freeswitch::CoreSession;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_CoreSession($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*swig_session_get = *freeswitchc::CoreSession_session_get;
|
|
|
|
*swig_session_set = *freeswitchc::CoreSession_session_set;
|
|
|
|
*swig_channel_get = *freeswitchc::CoreSession_channel_get;
|
|
|
|
*swig_channel_set = *freeswitchc::CoreSession_channel_set;
|
|
|
|
*swig_flags_get = *freeswitchc::CoreSession_flags_get;
|
|
|
|
*swig_flags_set = *freeswitchc::CoreSession_flags_set;
|
|
|
|
*swig_allocated_get = *freeswitchc::CoreSession_allocated_get;
|
|
|
|
*swig_allocated_set = *freeswitchc::CoreSession_allocated_set;
|
|
|
|
*swig_cb_state_get = *freeswitchc::CoreSession_cb_state_get;
|
|
|
|
*swig_cb_state_set = *freeswitchc::CoreSession_cb_state_set;
|
|
|
|
*swig_hook_state_get = *freeswitchc::CoreSession_hook_state_get;
|
|
|
|
*swig_hook_state_set = *freeswitchc::CoreSession_hook_state_set;
|
2008-07-14 20:37:36 +00:00
|
|
|
*swig_uuid_get = *freeswitchc::CoreSession_uuid_get;
|
|
|
|
*swig_uuid_set = *freeswitchc::CoreSession_uuid_set;
|
|
|
|
*swig_tts_name_get = *freeswitchc::CoreSession_tts_name_get;
|
|
|
|
*swig_tts_name_set = *freeswitchc::CoreSession_tts_name_set;
|
|
|
|
*swig_voice_name_get = *freeswitchc::CoreSession_voice_name_get;
|
|
|
|
*swig_voice_name_set = *freeswitchc::CoreSession_voice_name_set;
|
2008-04-25 22:12:01 +00:00
|
|
|
*answer = *freeswitchc::CoreSession_answer;
|
|
|
|
*preAnswer = *freeswitchc::CoreSession_preAnswer;
|
|
|
|
*hangup = *freeswitchc::CoreSession_hangup;
|
|
|
|
*setVariable = *freeswitchc::CoreSession_setVariable;
|
2008-04-29 23:34:26 +00:00
|
|
|
*setPrivate = *freeswitchc::CoreSession_setPrivate;
|
|
|
|
*getPrivate = *freeswitchc::CoreSession_getPrivate;
|
2008-04-25 22:12:01 +00:00
|
|
|
*getVariable = *freeswitchc::CoreSession_getVariable;
|
2008-05-12 13:37:36 +00:00
|
|
|
*process_callback_result = *freeswitchc::CoreSession_process_callback_result;
|
2008-05-13 20:36:23 +00:00
|
|
|
*say = *freeswitchc::CoreSession_say;
|
|
|
|
*sayPhrase = *freeswitchc::CoreSession_sayPhrase;
|
2008-04-25 22:12:01 +00:00
|
|
|
*recordFile = *freeswitchc::CoreSession_recordFile;
|
|
|
|
*setCallerData = *freeswitchc::CoreSession_setCallerData;
|
|
|
|
*originate = *freeswitchc::CoreSession_originate;
|
2008-09-15 21:44:43 +00:00
|
|
|
*destroy = *freeswitchc::CoreSession_destroy;
|
2008-04-25 22:12:01 +00:00
|
|
|
*setDTMFCallback = *freeswitchc::CoreSession_setDTMFCallback;
|
|
|
|
*speak = *freeswitchc::CoreSession_speak;
|
|
|
|
*set_tts_parms = *freeswitchc::CoreSession_set_tts_parms;
|
|
|
|
*collectDigits = *freeswitchc::CoreSession_collectDigits;
|
|
|
|
*getDigits = *freeswitchc::CoreSession_getDigits;
|
|
|
|
*transfer = *freeswitchc::CoreSession_transfer;
|
2008-05-02 19:04:13 +00:00
|
|
|
*read = *freeswitchc::CoreSession_read;
|
2008-04-25 22:12:01 +00:00
|
|
|
*playAndGetDigits = *freeswitchc::CoreSession_playAndGetDigits;
|
|
|
|
*streamFile = *freeswitchc::CoreSession_streamFile;
|
2008-07-08 17:27:02 +00:00
|
|
|
*sleep = *freeswitchc::CoreSession_sleep;
|
2008-04-25 22:12:01 +00:00
|
|
|
*flushEvents = *freeswitchc::CoreSession_flushEvents;
|
|
|
|
*flushDigits = *freeswitchc::CoreSession_flushDigits;
|
|
|
|
*setAutoHangup = *freeswitchc::CoreSession_setAutoHangup;
|
|
|
|
*setHangupHook = *freeswitchc::CoreSession_setHangupHook;
|
|
|
|
*ready = *freeswitchc::CoreSession_ready;
|
2008-06-02 23:42:59 +00:00
|
|
|
*answered = *freeswitchc::CoreSession_answered;
|
|
|
|
*mediaReady = *freeswitchc::CoreSession_mediaReady;
|
|
|
|
*waitForAnswer = *freeswitchc::CoreSession_waitForAnswer;
|
2008-04-25 22:12:01 +00:00
|
|
|
*execute = *freeswitchc::CoreSession_execute;
|
2008-04-29 23:34:26 +00:00
|
|
|
*sendEvent = *freeswitchc::CoreSession_sendEvent;
|
2008-05-10 17:02:43 +00:00
|
|
|
*setEventData = *freeswitchc::CoreSession_setEventData;
|
|
|
|
*getXMLCDR = *freeswitchc::CoreSession_getXMLCDR;
|
2008-04-25 22:12:01 +00:00
|
|
|
*begin_allow_threads = *freeswitchc::CoreSession_begin_allow_threads;
|
|
|
|
*end_allow_threads = *freeswitchc::CoreSession_end_allow_threads;
|
|
|
|
*get_uuid = *freeswitchc::CoreSession_get_uuid;
|
|
|
|
*get_cb_args = *freeswitchc::CoreSession_get_cb_args;
|
|
|
|
*check_hangup_hook = *freeswitchc::CoreSession_check_hangup_hook;
|
|
|
|
*run_dtmf_callback = *freeswitchc::CoreSession_run_dtmf_callback;
|
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
############# Class : freeswitch::Session ##############
|
|
|
|
|
|
|
|
package freeswitch::Session;
|
|
|
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|
|
|
@ISA = qw( freeswitch::CoreSession freeswitch );
|
|
|
|
%OWNER = ();
|
|
|
|
%ITERATORS = ();
|
|
|
|
sub new {
|
|
|
|
my $pkg = shift;
|
|
|
|
my $self = freeswitchc::new_Session(@_);
|
|
|
|
bless $self, $pkg if defined($self);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub DESTROY {
|
|
|
|
return unless $_[0]->isa('HASH');
|
|
|
|
my $self = tied(%{$_[0]});
|
|
|
|
return unless defined $self;
|
|
|
|
delete $ITERATORS{$self};
|
|
|
|
if (exists $OWNER{$self}) {
|
|
|
|
freeswitchc::delete_Session($self);
|
|
|
|
delete $OWNER{$self};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*begin_allow_threads = *freeswitchc::Session_begin_allow_threads;
|
|
|
|
*end_allow_threads = *freeswitchc::Session_end_allow_threads;
|
|
|
|
*check_hangup_hook = *freeswitchc::Session_check_hangup_hook;
|
|
|
|
*run_dtmf_callback = *freeswitchc::Session_run_dtmf_callback;
|
2008-07-14 20:37:36 +00:00
|
|
|
*setME = *freeswitchc::Session_setME;
|
2008-05-01 22:56:14 +00:00
|
|
|
*setInputCallback = *freeswitchc::Session_setInputCallback;
|
2008-08-14 17:20:34 +00:00
|
|
|
*unsetInputCallback = *freeswitchc::Session_unsetInputCallback;
|
2008-05-01 22:56:14 +00:00
|
|
|
*setHangupHook = *freeswitchc::Session_setHangupHook;
|
|
|
|
*ready = *freeswitchc::Session_ready;
|
2008-07-14 20:37:36 +00:00
|
|
|
*swig_suuid_get = *freeswitchc::Session_suuid_get;
|
|
|
|
*swig_suuid_set = *freeswitchc::Session_suuid_set;
|
2008-05-01 22:56:14 +00:00
|
|
|
*swig_cb_function_get = *freeswitchc::Session_cb_function_get;
|
|
|
|
*swig_cb_function_set = *freeswitchc::Session_cb_function_set;
|
|
|
|
*swig_cb_arg_get = *freeswitchc::Session_cb_arg_get;
|
|
|
|
*swig_cb_arg_set = *freeswitchc::Session_cb_arg_set;
|
|
|
|
*swig_hangup_func_str_get = *freeswitchc::Session_hangup_func_str_get;
|
|
|
|
*swig_hangup_func_str_set = *freeswitchc::Session_hangup_func_str_set;
|
2008-05-08 23:58:45 +00:00
|
|
|
*swig_hangup_func_arg_get = *freeswitchc::Session_hangup_func_arg_get;
|
|
|
|
*swig_hangup_func_arg_set = *freeswitchc::Session_hangup_func_arg_set;
|
2008-05-01 22:56:14 +00:00
|
|
|
*setPERL = *freeswitchc::Session_setPERL;
|
2008-04-25 22:12:01 +00:00
|
|
|
sub DISOWN {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
delete $OWNER{$ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
sub ACQUIRE {
|
|
|
|
my $self = shift;
|
|
|
|
my $ptr = tied(%$self);
|
|
|
|
$OWNER{$ptr} = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# ------- VARIABLE STUBS --------
|
|
|
|
|
|
|
|
package freeswitch;
|
|
|
|
|
|
|
|
*S_HUP = *freeswitchc::S_HUP;
|
|
|
|
*S_FREE = *freeswitchc::S_FREE;
|
|
|
|
*S_RDLOCK = *freeswitchc::S_RDLOCK;
|
|
|
|
1;
|