00001 #ifndef _MONITOR_H 00002 #define _MONITOR_H 00003 00004 #include <stdio.h> 00005 00006 #include <asterisk/channel.h> 00007 00008 struct ast_channel; 00009 00010 //! Responsible for channel monitoring data 00011 struct ast_channel_monitor 00012 { 00013 struct ast_filestream *read_stream; 00014 struct ast_filestream *write_stream; 00015 char read_filename[ FILENAME_MAX ]; 00016 char write_filename[ FILENAME_MAX ]; 00017 char filename_base[ FILENAME_MAX ]; 00018 char *format; 00019 int (*stop)( struct ast_channel *chan, int need_lock); 00020 }; 00021 00022 /* Start monitoring a channel */ 00023 int ast_monitor_start( struct ast_channel *chan, const char *format_spec, 00024 const char *fname_base, int need_lock ); 00025 00026 /* Stop monitoring a channel */ 00027 int ast_monitor_stop( struct ast_channel *chan, int need_lock); 00028 00029 /* Change monitoring filename of a channel */ 00030 int ast_monitor_change_fname( struct ast_channel *chan, 00031 const char *fname_base, int need_lock ); 00032 00033 #endif /* _MONITOR_H */