diff options
author | Matthias Nick <mnick@digium.com> | 2009-09-10 19:39:41 +0000 |
---|---|---|
committer | Matthias Nick <mnick@digium.com> | 2009-09-10 19:39:41 +0000 |
commit | 8e1bae06bf2f1a590c0ac2e6ecd827f9524f6a7d (patch) | |
tree | 237304f29df34494093d5a3792600d4466e99ac3 /res/res_musiconhold.c | |
parent | b5a0ec3e5e9e1b0066c6200947bd04efe3cb8b64 (diff) |
Sets the correct musicclass after an announcement
(closes issue #15279)
Reported by: mbeckwell
Patches:
patch.txt uploaded by mnick (license )
Tested by: mnick
(closes issue #15832)
Reported by: mbeckwell
Patches:
patch.txt uploaded by mnick (license 874)
Tested by: mnick
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 7a96be568..090f927a2 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -386,14 +386,10 @@ static void moh_handle_digit(struct ast_channel *chan, char digit) if ((class = get_mohbydigit(digit))) { classname = ast_strdupa(class->name); class = mohclass_unref(class, "Unreffing ao2_find from finding by digit"); + ast_string_field_set(chan,musicclass,classname); + ast_moh_stop(chan); + ast_moh_start(chan, classname, NULL); } - - if (!class) { - return; - } - - ast_moh_stop(chan); - ast_moh_start(chan, classname, NULL); } static struct ast_generator moh_file_stream = |