Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should...
[asterisk-bristuff.git] / include / asterisk / musiconhold.h
blob8a8018d19a01e3032a2d3686cf544f027b60fb8f
1 /*
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.
19 /*! \file
20 * \brief Music on hold handling
23 #ifndef _ASTERISK_MOH_H
24 #define _ASTERISK_MOH_H
26 #if defined(__cplusplus) || defined(c_plusplus)
27 extern "C" {
28 #endif
30 /*!
31 * \brief Turn on music on hold on a given channel
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.
36 * \param interpclass The class to use if the musicclass is not currently set on
37 * the channel structure or in the mclass argument.
39 * \retval 0 success
40 * \retval non-zero failure
42 int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass);
44 /*! Turn off music on hold on a given channel */
45 void ast_moh_stop(struct ast_channel *chan);
47 void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, const char *, const char *),
48 void (*stop_ptr)(struct ast_channel *),
49 void (*cleanup_ptr)(struct ast_channel *));
51 void ast_uninstall_music_functions(void);
53 void ast_moh_cleanup(struct ast_channel *chan);
55 #if defined(__cplusplus) || defined(c_plusplus)
57 #endif
59 #endif /* _ASTERISK_MOH_H */