2007-05-08 00:29:49 +00:00
# ifndef SWITCH_CPP_H
# define SWITCH_CPP_H
2007-06-01 18:50:34 +00:00
# ifdef __cplusplus
extern " C " {
# endif
# ifdef DOH
}
# endif
2007-05-08 00:29:49 +00:00
# include <switch.h>
2008-05-16 15:03:45 +00:00
# define this_check(x) do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0)
2008-09-18 01:49:08 +00:00
# define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0)
2008-04-29 23:34:26 +00:00
# define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
# define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
2008-07-15 14:41:08 +00:00
# define init_vars() allocated = 0; \
session = NULL ; \
channel = NULL ; \
uuid = NULL ; \
tts_name = NULL ; \
voice_name = NULL ; \
xml_cdr_text = NULL ; \
memset ( & args , 0 , sizeof ( args ) ) ; \
ap = NULL ; \
2008-10-09 12:58:49 +00:00
flags = 0 ; \
2008-07-15 14:41:08 +00:00
on_hangup = NULL ; \
memset ( & cb_state , 0 , sizeof ( cb_state ) ) ; \
hook_state = CS_NEW ; \
2009-09-17 23:28:38 +00:00
fhp = NULL ; \
cause = SWITCH_CAUSE_NONE
2008-07-15 14:41:08 +00:00
2008-05-27 04:30:03 +00:00
//// C++ Interface: switch_to_cpp_mempool//// Description: This class allows for overloading the new operator to allocate from a switch_memory_pool_t//// Author: Yossi Neiman <freeswitch@cartissolutions.com>, (C) 2007//// Copyright: See COPYING file that comes with this distribution//
2008-04-30 19:42:26 +00:00
#if 0
2007-06-22 19:14:53 +00:00
# ifndef SWITCHTOMEMPOOL
# define SWITCHTOMEMPOOL
class SwitchToMempool {
2008-05-27 04:30:03 +00:00
public :
SwitchToMempool ( ) {
} SwitchToMempool ( switch_memory_pool_t * mem ) {
memorypool = mem ;
}
void * operator new ( switch_size_t num_bytes , switch_memory_pool_t * mem ) {
void * ptr = switch_core_alloc ( mem , ( switch_size_t ) num_bytes ) ;
return ptr ;
}
protected :
switch_memory_pool_t * memorypool ;
2007-06-22 19:14:53 +00:00
} ;
# endif
2008-04-30 19:42:26 +00:00
# endif
2007-06-22 19:14:53 +00:00
/*
Overview : once you create an object that inherits this class , since
the memory pool is then a class data member , you can continue to
allocate objects from the memory pool .
objects from within the class
Notes on usage :
1. The derived class will need to also overload the ctor so that it accepts a memory pool object as a parameter .
2. Instantiation of a class would then look something like this : Foo * bar = new ( memory_pool ) Foo ( memory_pool ) ;
Note that the first parameter to the new operator is implicitly handled by c + + . . . not sure I like that but it ' s how it is . . .
*/
2011-10-21 08:56:42 -05:00
SWITCH_DECLARE ( void ) setGlobalVariable ( char * var_name , char * var_val ) ;
SWITCH_DECLARE ( char * ) getGlobalVariable ( char * var_name ) ;
2008-04-30 23:42:37 +00:00
SWITCH_DECLARE ( void ) consoleLog ( char * level_str , char * msg ) ;
SWITCH_DECLARE ( void ) consoleCleanLog ( char * msg ) ;
2012-11-26 15:18:58 -06:00
SWITCH_DECLARE ( bool ) running ( void ) ;
2008-04-30 23:42:37 +00:00
2011-02-02 11:04:39 -06:00
SWITCH_DECLARE ( bool ) email ( char * to , char * from , char * headers = NULL , char * body = NULL ,
char * file = NULL , char * convert_cmd = NULL , char * convert_ext = NULL ) ;
2009-02-17 21:41:01 +00:00
class CoreSession ;
2008-05-27 04:30:03 +00:00
class IVRMenu {
protected :
switch_ivr_menu_t * menu ;
switch_memory_pool_t * pool ;
public :
SWITCH_DECLARE_CONSTRUCTOR IVRMenu ( IVRMenu * main ,
const char * name ,
const char * greeting_sound ,
const char * short_greeting_sound ,
const char * invalid_sound ,
const char * exit_sound ,
const char * confirm_macro ,
const char * confirm_key ,
2009-02-25 16:49:42 +00:00
const char * tts_engine ,
const char * tts_voice ,
2008-10-01 17:31:59 +00:00
int confirm_attempts , int inter_timeout , int digit_len ,
int timeout , int max_failures , int max_timeouts ) ;
2008-05-27 04:30:03 +00:00
virtual SWITCH_DECLARE_CONSTRUCTOR ~ IVRMenu ( ) ;
SWITCH_DECLARE ( void ) bindAction ( char * action , const char * arg , const char * bind ) ;
SWITCH_DECLARE ( void ) execute ( CoreSession * session , const char * name ) ;
} ;
class API {
protected :
char * last_data ;
2009-02-19 00:43:11 +00:00
char time_buf [ 64 ] ;
2008-05-27 04:30:03 +00:00
public :
SWITCH_DECLARE_CONSTRUCTOR API ( void ) ;
virtual SWITCH_DECLARE_CONSTRUCTOR ~ API ( ) ;
2009-09-02 18:33:33 +00:00
SWITCH_DECLARE ( const char * ) execute ( const char * command , const char * data = NULL ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( const char * ) executeString ( const char * command ) ;
2009-02-19 00:43:11 +00:00
SWITCH_DECLARE ( char * ) getTime ( void ) ;
2008-05-27 04:30:03 +00:00
} ;
typedef struct input_callback_state {
void * function ; // pointer to the language specific callback function
// eg, PyObject *pyfunc
void * threadState ; // pointer to the language specific thread state
// eg, PyThreadState *threadState
void * extra ; // currently used to store a switch_file_handle_t
char * funcargs ; // extra string that will be passed to callback function
} input_callback_state_t ;
typedef enum {
S_HUP = ( 1 < < 0 ) ,
S_FREE = ( 1 < < 1 ) ,
S_RDLOCK = ( 1 < < 2 )
} session_flag_t ;
2008-07-11 19:42:52 +00:00
class DTMF {
public :
char digit ;
uint32_t duration ;
SWITCH_DECLARE_CONSTRUCTOR DTMF ( char idigit , uint32_t iduration = SWITCH_DEFAULT_DTMF_DURATION ) ;
virtual SWITCH_DECLARE_CONSTRUCTOR ~ DTMF ( ) ;
} ;
2008-05-27 04:30:03 +00:00
class Stream {
protected :
switch_stream_handle_t mystream ;
switch_stream_handle_t * stream_p ;
int mine ;
public :
SWITCH_DECLARE_CONSTRUCTOR Stream ( void ) ;
SWITCH_DECLARE_CONSTRUCTOR Stream ( switch_stream_handle_t * ) ;
virtual SWITCH_DECLARE_CONSTRUCTOR ~ Stream ( ) ;
SWITCH_DECLARE ( void ) write ( const char * data ) ;
SWITCH_DECLARE ( const char * ) get_data ( void ) ;
} ;
class Event {
protected :
public :
switch_event_t * event ;
char * serialized_string ;
int mine ;
SWITCH_DECLARE_CONSTRUCTOR Event ( const char * type , const char * subclass_name = NULL ) ;
SWITCH_DECLARE_CONSTRUCTOR Event ( switch_event_t * wrap_me , int free_me = 0 ) ;
virtual SWITCH_DECLARE_CONSTRUCTOR ~ Event ( ) ;
2011-09-21 14:31:10 -05:00
SWITCH_DECLARE ( int ) chat_execute ( const char * app , const char * data = NULL ) ;
SWITCH_DECLARE ( int ) chat_send ( const char * dest_proto = NULL ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( const char * ) serialize ( const char * format = NULL ) ;
SWITCH_DECLARE ( bool ) setPriority ( switch_priority_t priority = SWITCH_PRIORITY_NORMAL ) ;
2009-12-02 18:19:14 +00:00
SWITCH_DECLARE ( const char * ) getHeader ( const char * header_name ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( char * ) getBody ( void ) ;
SWITCH_DECLARE ( const char * ) getType ( void ) ;
SWITCH_DECLARE ( bool ) addBody ( const char * value ) ;
SWITCH_DECLARE ( bool ) addHeader ( const char * header_name , const char * value ) ;
SWITCH_DECLARE ( bool ) delHeader ( const char * header_name ) ;
SWITCH_DECLARE ( bool ) fire ( void ) ;
} ;
2008-07-02 17:18:34 +00:00
class EventConsumer {
protected :
2008-07-02 21:12:57 +00:00
switch_memory_pool_t * pool ;
2013-01-29 09:34:23 -06:00
int ready ;
2008-07-02 21:12:57 +00:00
public :
switch_queue_t * events ;
2008-07-02 17:18:34 +00:00
switch_event_types_t e_event_id ;
char * e_callback ;
char * e_subclass_name ;
2008-07-02 21:12:57 +00:00
char * e_cb_arg ;
2010-05-17 18:37:27 -05:00
switch_event_node_t * enodes [ SWITCH_EVENT_ALL + 1 ] ;
uint32_t node_index ;
2012-06-14 11:31:46 -05:00
SWITCH_DECLARE_CONSTRUCTOR EventConsumer ( const char * event_name = NULL , const char * subclass_name = " " , int len = 5000 ) ;
2008-07-02 17:18:34 +00:00
SWITCH_DECLARE_CONSTRUCTOR ~ EventConsumer ( ) ;
2010-05-10 13:06:22 -05:00
SWITCH_DECLARE ( int ) bind ( const char * event_name , const char * subclass_name = " " ) ;
2011-11-16 16:00:14 -06:00
SWITCH_DECLARE ( Event * ) pop ( int block = 0 , int timeout = 0 ) ;
2013-01-29 09:34:23 -06:00
SWITCH_DECLARE ( void ) cleanup ( ) ;
2008-07-02 17:18:34 +00:00
} ;
2008-05-27 04:30:03 +00:00
2009-02-17 21:41:01 +00:00
# ifdef SWIG
class CoreSession {
# else
2009-02-16 19:32:06 +00:00
class SWITCH_DECLARE_CLASS CoreSession {
2009-02-17 21:41:01 +00:00
# endif
2008-05-27 04:30:03 +00:00
protected :
switch_input_args_t args ; // holds ptr to cb function and input_callback_state struct
// which has a language specific callback function
switch_input_args_t * ap ; // ptr to args .. (is this really needed?)
// instead set them here first
char * xml_cdr_text ;
void store_file_handle ( switch_file_handle_t * fh ) ;
void * on_hangup ; // language specific callback function, cast as void *
switch_file_handle_t * fhp ;
char dtmf_buf [ 512 ] ;
public :
SWITCH_DECLARE_CONSTRUCTOR CoreSession ( ) ;
2008-07-16 21:06:14 +00:00
SWITCH_DECLARE_CONSTRUCTOR CoreSession ( char * nuuid , CoreSession * a_leg = NULL ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE_CONSTRUCTOR CoreSession ( switch_core_session_t * new_session ) ;
2008-07-11 19:42:52 +00:00
virtual SWITCH_DECLARE_CONSTRUCTOR ~ CoreSession ( ) ;
2008-05-27 04:30:03 +00:00
switch_core_session_t * session ;
switch_channel_t * channel ;
unsigned int flags ;
int allocated ;
input_callback_state cb_state ; // callback state, always pointed to by the buf
// field in this->args
switch_channel_state_t hook_state ; // store hookstate for on_hangup callback
2009-09-17 23:28:38 +00:00
switch_call_cause_t cause ;
2008-05-27 04:30:03 +00:00
2008-07-14 20:49:29 +00:00
char * uuid ;
char * tts_name ;
char * voice_name ;
2010-12-29 15:09:57 -06:00
SWITCH_DECLARE ( int ) insertFile ( const char * file , const char * insert_file , int sample_point ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( int ) answer ( ) ;
SWITCH_DECLARE ( int ) preAnswer ( ) ;
2008-08-20 01:12:23 +00:00
SWITCH_DECLARE ( void ) hangup ( const char * cause = " normal_clearing " ) ;
2009-11-04 23:58:26 +00:00
SWITCH_DECLARE ( void ) hangupState ( void ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) setVariable ( char * var , char * val ) ;
SWITCH_DECLARE ( void ) setPrivate ( char * var , void * val ) ;
SWITCH_DECLARE ( void * ) getPrivate ( char * var ) ;
SWITCH_DECLARE ( const char * ) getVariable ( char * var ) ;
SWITCH_DECLARE ( switch_status_t ) process_callback_result ( char * result ) ;
2010-03-07 19:34:05 +00:00
SWITCH_DECLARE ( void ) say ( const char * tosay , const char * module_name , const char * say_type , const char * say_method ,
const char * say_gender = NULL ) ;
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) sayPhrase ( const char * phrase_name , const char * phrase_data = " " , const char * phrase_lang = NULL ) ;
2009-09-17 23:28:38 +00:00
SWITCH_DECLARE ( const char * ) hangupCause ( ) ;
2009-09-19 15:26:19 +00:00
SWITCH_DECLARE ( const char * ) getState ( ) ;
2007-06-20 14:35:22 +00:00
/** \brief Record to a file
2008-05-26 09:55:20 +00:00
* \ param file_name
2007-06-20 14:35:22 +00:00
* \ param < [ max_len ] > maximum length of the recording in seconds
2008-05-26 09:55:20 +00:00
* \ param < [ silence_threshold ] > energy level audio must fall below
2007-06-20 14:35:22 +00:00
* to be considered silence ( 500 is a good starting point ) .
* \ param < [ silence_secs ] > seconds of silence to interrupt the record .
*/
2008-08-19 22:25:28 +00:00
SWITCH_DECLARE ( int ) recordFile ( char * file_name , int time_limit = 0 , int silence_threshold = 0 , int silence_hits = 0 ) ;
2007-06-20 14:35:22 +00:00
2007-06-20 08:56:34 +00:00
/** \brief Set attributes of caller data for purposes of outgoing calls
* \ param var - the variable name , eg , " caller_id_name "
* \ param val - the data to set , eg , " bob "
*/
/** \brief Originate a call to a destination
*
2008-05-26 09:55:20 +00:00
* \ param a_leg_session - the session where the call is originating from
* and also the session in which _this_ session was
* created
2008-05-27 02:30:37 +00:00
* \ param dest - a string representing destination , eg , sofia / mydomain . com / foo \ @ bar . com
2008-05-26 09:55:20 +00:00
* \ param timeout - time to wait for call to be answered
2007-06-20 08:56:34 +00:00
* \ return an int status code indicating success or failure
2008-05-26 09:55:20 +00:00
*
2007-06-20 08:56:34 +00:00
*/
2009-09-14 20:10:58 +00:00
SWITCH_DECLARE ( int ) originate ( CoreSession * a_leg_session , char * dest , int timeout = 60 , switch_state_handler_table_t * handlers = NULL ) ;
2007-06-20 08:56:34 +00:00
2007-06-15 17:25:41 +00:00
2009-03-24 15:30:08 +00:00
SWITCH_DECLARE ( virtual void ) destroy ( void ) ;
2008-09-15 21:44:43 +00:00
2007-06-15 17:25:41 +00:00
/** \brief set a DTMF callback function
2008-05-26 09:55:20 +00:00
*
* The DTMF callback function will be set and persist
* for the life of the session , and be called when a dtmf
* is pressed by user during streamfile ( ) , collectDigits ( ) , and
* certain other methods are executing .
*
2007-06-15 17:25:41 +00:00
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) setDTMFCallback ( void * cbfunc , char * funcargs ) ;
2007-06-22 19:14:53 +00:00
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( int ) speak ( char * text ) ;
SWITCH_DECLARE ( void ) set_tts_parms ( char * tts_name , char * voice_name ) ;
2013-02-04 11:36:56 -06:00
SWITCH_DECLARE ( void ) set_tts_params ( char * tts_name , char * voice_name ) ;
2007-06-15 17:25:41 +00:00
2007-08-20 16:33:28 +00:00
/**
2008-05-26 09:55:20 +00:00
* For timeout milliseconds , call the dtmf function set previously
2007-08-20 16:33:28 +00:00
* by setDTMFCallback whenever a dtmf or event is received
*/
2009-09-25 19:07:20 +00:00
SWITCH_DECLARE ( int ) collectDigits ( int abs_timeout ) ;
SWITCH_DECLARE ( int ) collectDigits ( int digit_timeout , int abs_timeout ) ;
2007-08-20 16:33:28 +00:00
/**
2008-05-26 09:55:20 +00:00
* Collect up to maxdigits digits worth of digits
* and store them in dtmf_buf . In the case of mod_python , the
2007-08-20 16:33:28 +00:00
* dtmf_buf parameter is configured to act as a _return_ value ,
* ( see mod_python . i ) . This does NOT call any callbacks upon
* receiving dtmf digits . For that , use collectDigits .
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( char * ) getDigits ( int maxdigits , char * terminators , int timeout ) ;
2008-06-23 19:15:17 +00:00
SWITCH_DECLARE ( char * ) getDigits ( int maxdigits , char * terminators , int timeout , int interdigit ) ;
2008-08-14 16:57:16 +00:00
SWITCH_DECLARE ( int ) transfer ( char * extension , char * dialplan = NULL , char * context = NULL ) ;
2008-05-27 04:30:03 +00:00
2010-09-23 18:37:45 -05:00
SWITCH_DECLARE ( char * ) read ( int min_digits , int max_digits ,
const char * prompt_audio_file , int timeout , const char * valid_terminators , int digit_timeout = 0 ) ;
2008-05-27 04:30:03 +00:00
2007-06-15 17:25:41 +00:00
/** \brief Play a file into channel and collect dtmfs
*
2008-05-26 09:55:20 +00:00
* See API docs in switch_ivr . h : switch_play_and_get_digits ( . . )
*
* NOTE : this does not call any dtmf callbacks set by
* setDTMFCallback ( . . ) as it uses its own internal callback
* handler .
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( char * ) playAndGetDigits ( int min_digits ,
int max_digits ,
int max_tries ,
2009-01-15 03:42:45 +00:00
int timeout , char * terminators , char * audio_files , char * bad_input_audio_files ,
2011-08-18 20:29:52 -07:00
char * digits_regex , const char * var_name = NULL , int digit_timeout = 0 ,
const char * transfer_on_failure = NULL ) ;
2007-06-15 17:25:41 +00:00
/** \brief Play a file that resides on disk into the channel
*
* \ param file - the path to the . wav / . mp3 to be played
* \ param starting_sample_count - the index of the sample to
2008-05-26 09:55:20 +00:00
* start playing from
2007-06-15 17:25:41 +00:00
* \ return an int status code indicating success or failure
*
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( int ) streamFile ( char * file , int starting_sample_count = 0 ) ;
2008-12-10 00:48:24 +00:00
SWITCH_DECLARE ( int ) sleep ( int ms , int sync = 0 ) ;
2007-06-15 17:25:41 +00:00
2007-06-22 19:14:53 +00:00
/** \brief flush any pending events
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( int ) flushEvents ( ) ;
2007-06-22 19:14:53 +00:00
/** \brief flush any pending digits
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( int ) flushDigits ( ) ;
2007-06-22 19:14:53 +00:00
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( int ) setAutoHangup ( bool val ) ;
2007-06-22 19:14:53 +00:00
/** \brief Set the hangup callback function
* \ param hangup_func - language specific function ptr cast into void *
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) setHangupHook ( void * hangup_func ) ;
2007-06-22 19:14:53 +00:00
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( bool ) ready ( ) ;
2010-03-01 20:04:12 +00:00
SWITCH_DECLARE ( bool ) bridged ( ) ;
2008-06-02 23:37:12 +00:00
SWITCH_DECLARE ( bool ) answered ( ) ;
SWITCH_DECLARE ( bool ) mediaReady ( ) ;
2007-06-15 17:25:41 +00:00
2008-06-02 23:42:59 +00:00
SWITCH_DECLARE ( void ) waitForAnswer ( CoreSession * calling_session ) ;
2009-01-30 23:19:38 +00:00
SWITCH_DECLARE ( void ) execute ( const char * app , const char * data = NULL ) ;
2008-04-29 23:34:26 +00:00
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) sendEvent ( Event * sendME ) ;
2008-04-29 23:34:26 +00:00
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) setEventData ( Event * e ) ;
SWITCH_DECLARE ( char * ) getXMLCDR ( ) ;
2008-05-10 17:02:43 +00:00
2008-05-27 04:30:03 +00:00
virtual bool begin_allow_threads ( ) = 0 ;
virtual bool end_allow_threads ( ) = 0 ;
2007-06-15 17:25:41 +00:00
2007-06-20 08:56:34 +00:00
/** \brief Get the uuid of this session
* \ return the uuid of this session
*/
2009-02-04 02:56:16 +00:00
const char * get_uuid ( ) const {
2008-07-16 20:19:11 +00:00
return uuid ? uuid : ( char * ) " uninitialized " ;
2008-05-27 04:30:03 +00:00
} ;
2007-06-20 08:56:34 +00:00
/** \brief Get the callback function arguments associated with this session
* \ return a const reference to the callback function arguments
*/
2008-05-27 04:30:03 +00:00
const switch_input_args_t & get_cb_args ( ) const {
return args ;
} ;
2007-06-20 08:56:34 +00:00
2007-06-22 19:14:53 +00:00
/** \brief Callback to the language specific hangup callback
*/
2008-05-27 04:30:03 +00:00
virtual void check_hangup_hook ( ) = 0 ;
2007-06-22 19:14:53 +00:00
2008-05-27 04:30:03 +00:00
virtual switch_status_t run_dtmf_callback ( void * input , switch_input_type_t itype ) = 0 ;
2007-06-01 18:50:34 +00:00
2008-05-27 04:30:03 +00:00
} ;
2007-05-08 00:29:49 +00:00
2007-06-20 08:56:34 +00:00
/* ---- functions not bound to CoreSession instance ----- */
2008-04-30 14:20:31 +00:00
SWITCH_DECLARE ( void ) console_log ( char * level_str , char * msg ) ;
SWITCH_DECLARE ( void ) console_clean_log ( char * msg ) ;
2008-11-21 19:15:47 +00:00
SWITCH_DECLARE ( void ) msleep ( unsigned ms ) ;
2007-06-20 08:56:34 +00:00
/** \brief bridge the audio of session_b into session_a
*
* NOTE : the stuff regarding the dtmf callback might be completely
* wrong and has not been reviewed or tested
*/
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE ( void ) bridge ( CoreSession & session_a , CoreSession & session_b ) ;
2007-06-20 08:56:34 +00:00
2007-06-22 19:14:53 +00:00
/** \brief the actual hangup hook called back by freeswitch core
* which in turn gets the session and calls the appropriate
* instance method to complete the callback .
*/
2008-04-30 14:20:31 +00:00
SWITCH_DECLARE_NONSTD ( switch_status_t ) hanguphook ( switch_core_session_t * session ) ;
2007-06-22 19:14:53 +00:00
2008-05-27 04:30:03 +00:00
SWITCH_DECLARE_NONSTD ( switch_status_t ) dtmf_callback ( switch_core_session_t * session ,
void * input , switch_input_type_t itype , void * buf , unsigned int buflen ) ;
2007-06-22 19:14:53 +00:00
2009-02-19 00:43:11 +00:00
2007-06-01 18:50:34 +00:00
# ifdef __cplusplus
}
# endif
2007-05-08 00:29:49 +00:00
# endif
/* For Emacs:
* Local Variables :
* mode : c
2008-02-03 22:14:57 +00:00
* indent - tabs - mode : t
2007-05-08 00:29:49 +00:00
* tab - width : 4
* c - basic - offset : 4
* End :
* For VIM :
2008-07-03 19:12:26 +00:00
* vim : set softtabstop = 4 shiftwidth = 4 tabstop = 4 :
2007-05-08 00:29:49 +00:00
*/