]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9533 [mod_conference] add member-enter-sound
authorLuis Azedo <luis@2600hz.com>
Mon, 19 Sep 2016 02:39:01 +0000 (02:39 +0000)
committerLuis Azedo <luis@2600hz.com>
Mon, 19 Sep 2016 08:11:29 +0000 (09:11 +0100)
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_conference/mod_conference.h

index 9692b931b1ec21b483160b312345ae782437f1c3..000745a076cf8539da42279811a07eebb3c09d21 100644 (file)
@@ -2087,6 +2087,10 @@ SWITCH_STANDARD_APP(conference_function)
                        goto done;
                }
 
+               if (conference->member_enter_sound && !switch_channel_test_app_flag_key("conference_silent", channel, CONF_SILENT_REQ)) {
+                       conference_file_local_play(conference, session, conference->member_enter_sound, CONF_DEFAULT_LEADIN, NULL, 0);
+               }
+
        }
 
        /* Release the config registry handle */
@@ -2362,6 +2366,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
        char *name_domain = NULL;
        char *tts_engine = NULL;
        char *tts_voice = NULL;
+       char *member_enter_sound = NULL;
        char *enter_sound = NULL;
        char *sound_prefix = NULL;
        char *exit_sound = NULL;
@@ -2557,6 +2562,8 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
                                tts_engine = val;
                        } else if (!strcasecmp(var, "tts-voice") && !zstr(val)) {
                                tts_voice = val;
+                       } else if (!strcasecmp(var, "member-enter-sound") && !zstr(val)) {
+                               member_enter_sound = val;
                        } else if (!strcasecmp(var, "enter-sound") && !zstr(val)) {
                                enter_sound = val;
                        } else if (!strcasecmp(var, "outcall-templ") && !zstr(val)) {
@@ -3029,6 +3036,10 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
                conference->enter_sound = switch_core_strdup(conference->pool, enter_sound);
        }
 
+       if (!zstr(member_enter_sound)) {
+               conference->member_enter_sound = switch_core_strdup(conference->pool, member_enter_sound);
+       }
+
        if (!zstr(exit_sound)) {
                conference->exit_sound = switch_core_strdup(conference->pool, exit_sound);
        }
index c812bc1160d77d59be3ebe72d1aeb69791217336..2f4e17693f9112b301de2cc5ed2ed2cbcfbf464a 100644 (file)
@@ -536,6 +536,7 @@ typedef struct conference_obj {
        char *timer_name;
        char *tts_engine;
        char *tts_voice;
+       char *member_enter_sound;
        char *enter_sound;
        char *exit_sound;
        char *alone_sound;