Sat Aug 6 00:39:30 2011

Asterisk developer's documentation


monitor.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2005, Digium, Inc.
00005  *
00006  * Mark Spencer <markster@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  * \brief Channel monitoring
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 /*! Responsible for channel monitoring data */
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 *format;
00042    int joinfiles;
00043    enum AST_MONITORING_STATE state;
00044    int (*stop)(struct ast_channel *chan, int need_lock);
00045 };
00046 
00047 /* Start monitoring a channel */
00048 int ast_monitor_start(struct ast_channel *chan, const char *format_spec,
00049             const char *fname_base, int need_lock );
00050 
00051 /* Stop monitoring a channel */
00052 int ast_monitor_stop(struct ast_channel *chan, int need_lock);
00053 
00054 /* Change monitoring filename of a channel */
00055 int ast_monitor_change_fname(struct ast_channel *chan,
00056               const char *fname_base, int need_lock);
00057 
00058 void ast_monitor_setjoinfiles(struct ast_channel *chan, int turnon);
00059 
00060 /* Pause monitoring of a channel */
00061 int ast_monitor_pause(struct ast_channel *chan);
00062 
00063 /* Unpause monitoring of a channel */
00064 int ast_monitor_unpause(struct ast_channel *chan);
00065 
00066 #endif /* _ASTERISK_MONITOR_H */

Generated on Sat Aug 6 00:39:30 2011 for Asterisk - the Open Source PBX by  doxygen 1.4.7