Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
loadable MixMonitor functionality More...
#include "asterisk.h"
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/mixmonitor.h"
#include "asterisk/utils.h"
#include "asterisk/channel.h"
Go to the source code of this file.
Functions | |
int | ast_clear_mixmonitor_methods (void) |
Clear the MixMonitor virtual methods table. Use this to cleanup function pointers provided by a module that set. More... | |
int | ast_set_mixmonitor_methods (struct ast_mixmonitor_methods *method_table) |
Setup MixMonitor virtual methods table. Use this to provide the MixMonitor functionality from a loadable module. More... | |
int | ast_start_mixmonitor (struct ast_channel *chan, const char *filename, const char *options) |
Start a mixmonitor on a channel with the given parameters. More... | |
int | ast_stop_mixmonitor (struct ast_channel *chan, const char *mixmon_id) |
Stop a mixmonitor on a channel with the given parameters. More... | |
Variables | |
static ast_rwlock_t | mixmonitor_lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } |
static struct ast_mixmonitor_methods | mixmonitor_methods |
static int | table_loaded = 0 |
loadable MixMonitor functionality
Definition in file mixmonitor.c.
int ast_clear_mixmonitor_methods | ( | void | ) |
Clear the MixMonitor virtual methods table. Use this to cleanup function pointers provided by a module that set.
0 | if successful |
non-zero | on failure (occurs when methods aren't loaded) |
Definition at line 59 of file mixmonitor.c.
References ast_log, lock, LOG_ERROR, mixmonitor_lock, mixmonitor_methods, SCOPED_WRLOCK, and table_loaded.
Referenced by clear_mixmonitor_methods().
int ast_set_mixmonitor_methods | ( | struct ast_mixmonitor_methods * | vmethod_table | ) |
Setup MixMonitor virtual methods table. Use this to provide the MixMonitor functionality from a loadable module.
vmethod_table | pointer to vmethod table providing mixmonitor functions |
0 | if successful |
non-zero | on failure |
Definition at line 43 of file mixmonitor.c.
References ast_log, lock, LOG_ERROR, mixmonitor_lock, mixmonitor_methods, SCOPED_WRLOCK, and table_loaded.
Referenced by set_mixmonitor_methods().
int ast_start_mixmonitor | ( | struct ast_channel * | chan, |
const char * | filename, | ||
const char * | options | ||
) |
Start a mixmonitor on a channel with the given parameters.
chan | Which channel to apply the MixMonitor to |
filename | filename to use for the recording |
options | Optional arguments to be interpreted by the MixMonitor start function |
0 | if successful |
non-zero | on failure |
Definition at line 74 of file mixmonitor.c.
References ast_log, lock, LOG_ERROR, mixmonitor_lock, mixmonitor_methods, options, SCOPED_RDLOCK, and ast_mixmonitor_methods::start.
Referenced by setup_mixmonitor(), and start_automixmonitor().
int ast_stop_mixmonitor | ( | struct ast_channel * | chan, |
const char * | mixmon_id | ||
) |
Stop a mixmonitor on a channel with the given parameters.
chan | Which channel to stop a MixMonitor on (may be NULL if mixmon_id is provided) |
mixmon_id | Which mixmon_id should be stopped (may be NULL if chan is provided) |
0 | if successful |
non-zero | on failure |
Definition at line 86 of file mixmonitor.c.
References ast_log, lock, LOG_ERROR, mixmonitor_lock, mixmonitor_methods, SCOPED_RDLOCK, and ast_mixmonitor_methods::stop.
Referenced by stop_automixmonitor().
|
static |
Definition at line 38 of file mixmonitor.c.
Referenced by ast_clear_mixmonitor_methods(), ast_set_mixmonitor_methods(), ast_start_mixmonitor(), and ast_stop_mixmonitor().
|
static |
Definition at line 40 of file mixmonitor.c.
Referenced by ast_clear_mixmonitor_methods(), ast_set_mixmonitor_methods(), ast_start_mixmonitor(), ast_stop_mixmonitor(), and set_mixmonitor_methods().
|
static |
Definition at line 41 of file mixmonitor.c.
Referenced by ast_clear_mixmonitor_methods(), and ast_set_mixmonitor_methods().