]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODAPP-261
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 30 Apr 2009 04:20:22 +0000 (04:20 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 30 Apr 2009 04:20:22 +0000 (04:20 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13207 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c

index 6a00d47dec1683037a0b012a5ee1110163f8a7b2..588eea2e8e78fdc4fe2cb02d00e25bc198e3cce1 100644 (file)
@@ -155,7 +155,8 @@ typedef enum {
        CFLAG_ENFORCE_MIN = (1 << 2),
        CFLAG_DESTRUCT = (1 << 3),
        CFLAG_LOCKED = (1 << 4),
-       CFLAG_ANSWERED = (1 << 5)
+       CFLAG_ANSWERED = (1 << 5),
+       CFLAG_BRIDGE_TO = (1 << 6),
 } conf_flag_t;
 
 typedef enum {
@@ -642,13 +643,17 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
                                        switch_snprintf(msg, sizeof(msg), "There are %d callers", conference->count);
                                        conference_member_say(member, msg, CONF_DEFAULT_LEADIN);
                                } else if (conference->count == 1 && !conference->perpetual_sound) {
-                                       if (conference->alone_sound) {
-                                               conference_stop_file(conference, FILE_STOP_ASYNC);
-                                               conference_play_file(conference, conference->alone_sound, CONF_DEFAULT_LEADIN, switch_core_session_get_channel(member->session), 1);
-                                       } else {
-                                               switch_snprintf(msg, sizeof(msg), "You are currently the only person in this conference.");
-                                               conference_member_say(member, msg, CONF_DEFAULT_LEADIN);
+                                       /* as long as its not a bridge_to conference, announce if person is alone */
+                                       if (!switch_test_flag(conference, CFLAG_BRIDGE_TO)) {
+                                               if (conference->alone_sound) {
+                                                       conference_stop_file(conference, FILE_STOP_ASYNC);
+                                                       conference_play_file(conference, conference->alone_sound, CONF_DEFAULT_LEADIN, switch_core_session_get_channel(member->session), 1);
+                                               } else {
+                                                       switch_snprintf(msg, sizeof(msg), "You are currently the only person in this conference.");
+                                                       conference_member_say(member, msg, CONF_DEFAULT_LEADIN);
+                                               }
                                        }
+
                                }
                        }
                }
@@ -4873,6 +4878,9 @@ SWITCH_STANDARD_APP(conference_function)
                /* Indicate the conference is dynamic */
                switch_set_flag_locked(conference, CFLAG_DYNAMIC);
 
+               /* Indicate the conference has a bridgeto party */
+               switch_set_flag_locked(conference, CFLAG_BRIDGE_TO);
+
                /* Start the conference thread for this conference */
                launch_conference_thread(conference);