Wed Jan 8 2020 09:49:48

Asterisk developer's documentation


monitor.h
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 1999 - 2005, Digium, Inc.
5  *
6  * Mark Spencer <markster@digium.com>
7  *
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.
13  *
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.
17  */
18 
19 /*! \file
20  * \brief Channel monitoring
21  */
22 
23 #ifndef _ASTERISK_MONITOR_H
24 #define _ASTERISK_MONITOR_H
25 
26 #include "asterisk/channel.h"
27 #include "asterisk/optional_api.h"
28 
32 };
33 
34 /* Streams recording control */
35 #define X_REC_IN 1
36 #define X_REC_OUT 2
37 #define X_JOIN 4
38 
39 /*! Responsible for channel monitoring data */
47  char *format;
48  int joinfiles;
50  int (*stop)(struct ast_channel *chan, int need_lock);
51 };
52 
53 /* Start monitoring a channel */
55  (struct ast_channel *chan, const char *format_spec,
56  const char *fname_base, int need_lock, int stream_action),
57  { return -1; });
58 
59 /* Stop monitoring a channel */
61  (struct ast_channel *chan, int need_lock),
62  { return -1; });
63 
64 /* Change monitoring filename of a channel */
66  (struct ast_channel *chan, const char *fname_base,
67  int need_lock),
68  { return -1; });
69 
71  (struct ast_channel *chan, int turnon),
72  { return; });
73 
74 /* Pause monitoring of a channel */
76  (struct ast_channel *chan),
77  { return -1; });
78 
79 /* Unpause monitoring of a channel */
81  (struct ast_channel *chan),
82  { return -1; });
83 
84 #endif /* _ASTERISK_MONITOR_H */
char read_filename[FILENAME_MAX]
Definition: monitor.h:43
Main Channel structure associated with a channel.
Definition: channel.h:742
Optional API function macros.
char filename_base[FILENAME_MAX]
Definition: monitor.h:45
AST_MONITORING_STATE
Definition: monitor.h:29
#define AST_OPTIONAL_API(result, name, proto, stub)
Define an optional API function.
Definition: optional_api.h:233
int(* stop)(struct ast_channel *chan, int need_lock)
Definition: monitor.h:50
void ast_monitor_setjoinfiles(struct ast_channel *chan, int turnon)
Definition: res_monitor.c:867
char write_filename[FILENAME_MAX]
Definition: monitor.h:44
General Asterisk PBX channel definitions.
int ast_monitor_unpause(struct ast_channel *chan)
Unpause monitoring of channel.
Definition: res_monitor.c:541
#define FILENAME_MAX
Definition: private.h:207
int ast_monitor_stop(struct ast_channel *chan, int need_lock)
Stop monitoring channel.
Definition: res_monitor.c:437
int ast_monitor_start(struct ast_channel *chan, const char *format_spec, const char *fname_base, int need_lock, int stream_action)
Start monitoring a channel.
Definition: res_monitor.c:290
int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, int need_lock)
Change monitored filename of channel.
Definition: res_monitor.c:566
struct ast_filestream * read_stream
Definition: monitor.h:41
int ast_monitor_pause(struct ast_channel *chan)
Pause monitoring of channel.
Definition: res_monitor.c:535
struct ast_filestream * write_stream
Definition: monitor.h:42
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
Definition: mod_format.h:100
enum AST_MONITORING_STATE state
Definition: monitor.h:49