]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4636 fix regression
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 26 Sep 2012 16:25:42 +0000 (11:25 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 26 Sep 2012 16:25:42 +0000 (11:25 -0500)
src/switch_ivr_originate.c

index 7cb296b1c612637b6f4de5209ee6ffa23f4feca1..0efa8e238e6c06abf6b623d65b7accafb8f4e08d 100644 (file)
@@ -1224,7 +1224,11 @@ static switch_status_t setup_ringback(originate_global_t *oglobals, originate_st
                                switch_goto_status(SWITCH_STATUS_GENERR, end);
                        }
 
-                       switch_core_session_get_read_impl(originate_status[0].peer_session, &peer_read_impl);
+                       if (oglobals->bridge_early_media > -1 && zstr(ringback_data) && len == 1 && originate_status[0].peer_session) {
+                               switch_core_session_get_read_impl(originate_status[0].peer_session, &peer_read_impl);
+                       } else {
+                               switch_core_session_get_read_impl(oglobals->session, &peer_read_impl);
+                       }
 
                        if (switch_core_codec_init(write_codec,
                                                                           "L16",