diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-19 20:44:39 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-19 20:44:39 +0000 |
commit | 6049bb6539153c2f400f1f2dbc763c74d796204b (patch) | |
tree | 3c36781db3a5a7a08967cbe8d83acb5d82e581cb /channel.c | |
parent | 28df168d0f9fd12f5914263015dc26898e834146 (diff) |
merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37988 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -3881,11 +3881,11 @@ ast_group_t ast_get_group(char *s) return group; } -static int (*ast_moh_start_ptr)(struct ast_channel *, const char *) = NULL; +static int (*ast_moh_start_ptr)(struct ast_channel *, const char *, const char *) = NULL; static void (*ast_moh_stop_ptr)(struct ast_channel *) = NULL; static void (*ast_moh_cleanup_ptr)(struct ast_channel *) = NULL; -void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, const char *), +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 *)) { @@ -3902,14 +3902,16 @@ void ast_uninstall_music_functions(void) } /*! \brief Turn on music on hold on a given channel */ -int ast_moh_start(struct ast_channel *chan, const char *mclass) +int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass) { if (ast_moh_start_ptr) - return ast_moh_start_ptr(chan, mclass); + return ast_moh_start_ptr(chan, mclass, interpclass); + + if (option_verbose > 2) { + ast_verbose(VERBOSE_PREFIX_3 "Music class %s requested but no musiconhold loaded.\n", + mclass ? mclass : (interpclass ? interpclass : "default")); + } - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Music class %s requested but no musiconhold loaded.\n", mclass ? mclass : "default"); - return 0; } |