Asterisk - The Open Source Telephony Project GIT-master-0bf3178
musiconhold.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 Music on hold handling
21 */
22
23#ifndef _ASTERISK_MOH_H
24#define _ASTERISK_MOH_H
25
26#if defined(__cplusplus) || defined(c_plusplus)
27extern "C" {
28#endif
29
30/*!
31 * \brief Turn on music on hold on a given channel
32 *
33 * \param chan The channel structure that will get music on hold
34 * \param mclass The class to use if the musicclass is not currently set on
35 * the channel structure. NULL and the empty string are equivalent.
36 * \param interpclass The class to use if the musicclass is not currently set on
37 * the channel structure or in the mclass argument.
38 * NULL and the empty string are equivalent.
39 *
40 * \retval Zero on success
41 * \retval non-zero on failure
42 */
43int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass);
44
45/*! \brief Turn off music on hold on a given channel */
46void ast_moh_stop(struct ast_channel *chan);
47
48void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, const char *, const char *),
49 void (*stop_ptr)(struct ast_channel *),
50 void (*cleanup_ptr)(struct ast_channel *));
51
53
54void ast_moh_cleanup(struct ast_channel *chan);
55
56#if defined(__cplusplus) || defined(c_plusplus)
57}
58#endif
59
60#endif /* _ASTERISK_MOH_H */
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass)
Turn on music on hold on a given channel.
Definition: channel.c:7788
void ast_moh_cleanup(struct ast_channel *chan)
Definition: channel.c:7804
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
Definition: channel.c:7798
void ast_install_music_functions(int(*start_ptr)(struct ast_channel *, const char *, const char *), void(*stop_ptr)(struct ast_channel *), void(*cleanup_ptr)(struct ast_channel *))
Definition: channel.c:7772
void ast_uninstall_music_functions(void)
Definition: channel.c:7781
Main Channel structure associated with a channel.