2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Mark Spencer <markster@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
20 * \brief Channel monitoring
23 #ifndef _ASTERISK_MONITOR_H
24 #define _ASTERISK_MONITOR_H
26 #include "asterisk/channel.h"
28 enum AST_MONITORING_STATE
{
33 /*! Responsible for channel monitoring data */
34 struct ast_channel_monitor
{
35 struct ast_filestream
*read_stream
;
36 struct ast_filestream
*write_stream
;
37 char read_filename
[FILENAME_MAX
];
38 char write_filename
[FILENAME_MAX
];
39 char filename_base
[FILENAME_MAX
];
43 enum AST_MONITORING_STATE state
;
44 int (*stop
)(struct ast_channel
*chan
, int need_lock
);
47 /* Start monitoring a channel */
48 int ast_monitor_start(struct ast_channel
*chan
, const char *format_spec
,
49 const char *fname_base
, int need_lock
);
51 /* Stop monitoring a channel */
52 int ast_monitor_stop(struct ast_channel
*chan
, int need_lock
);
54 /* Change monitoring filename of a channel */
55 int ast_monitor_change_fname(struct ast_channel
*chan
,
56 const char *fname_base
, int need_lock
);
58 void ast_monitor_setjoinfiles(struct ast_channel
*chan
, int turnon
);
60 /* Pause monitoring of a channel */
61 int ast_monitor_pause(struct ast_channel
*chan
);
63 /* Unpause monitoring of a channel */
64 int ast_monitor_unpause(struct ast_channel
*chan
);
66 #endif /* _ASTERISK_MONITOR_H */