00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ASTERISK_MONITOR_H
00024 #define _ASTERISK_MONITOR_H
00025
00026 #include "asterisk/channel.h"
00027
00028 enum AST_MONITORING_STATE {
00029 AST_MONITOR_RUNNING,
00030 AST_MONITOR_PAUSED
00031 };
00032
00033
00034 struct ast_channel_monitor {
00035 struct ast_filestream *read_stream;
00036 struct ast_filestream *write_stream;
00037 char read_filename[FILENAME_MAX];
00038 char write_filename[FILENAME_MAX];
00039 char filename_base[FILENAME_MAX];
00040 int filename_changed;
00041 char target_url[FILENAME_MAX];
00042 char target_script[FILENAME_MAX];
00043 char *format;
00044 int joinfiles;
00045 enum AST_MONITORING_STATE state;
00046 int (*stop)(struct ast_channel *chan, int need_lock);
00047 };
00048
00049
00050 int ast_monitor_start(struct ast_channel *chan, const char *format_spec,
00051 const char *fname_base, const char *target_url, const char *target_script, int need_lock );
00052
00053
00054 int ast_monitor_stop(struct ast_channel *chan, int need_lock);
00055
00056
00057 int ast_monitor_change_fname(struct ast_channel *chan,
00058 const char *fname_base, int need_lock);
00059
00060 void ast_monitor_setjoinfiles(struct ast_channel *chan, int turnon);
00061
00062
00063 int ast_monitor_pause(struct ast_channel *chan);
00064
00065
00066 int ast_monitor_unpause(struct ast_channel *chan);
00067
00068 #endif