Skip to content

Commit 0a66db6

Browse files
committed
FS-7111 #resolve please review
1 parent bca7216 commit 0a66db6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/switch_ivr_originate.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ static void *SWITCH_THREAD_FUNC early_thread_run(switch_thread_t *thread, void *
17891789
switch_core_session_set_read_codec(session, &read_codecs[i]);
17901790
}
17911791
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
1792-
if (SWITCH_READ_ACCEPTABLE(status)) {
1792+
if (SWITCH_READ_ACCEPTABLE(status) && !switch_test_flag(read_frame, SFF_CNG)) {
17931793
data = (int16_t *) read_frame->data;
17941794
if (datalen < read_frame->datalen) {
17951795
datalen = read_frame->datalen;
@@ -1802,7 +1802,7 @@ static void *SWITCH_THREAD_FUNC early_thread_run(switch_thread_t *thread, void *
18021802
}
18031803
} else {
18041804
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
1805-
if (SWITCH_READ_ACCEPTABLE(status)) {
1805+
if (SWITCH_READ_ACCEPTABLE(status) && !switch_test_flag(read_frame, SFF_CNG)) {
18061806
datalen = read_frame->datalen;
18071807
}
18081808
break;
@@ -3239,7 +3239,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
32393239
silence = 600;
32403240
}
32413241

3242-
if ((ringback.fh || silence || ringback.audio_buffer || oglobals.bridge_early_media > -1) && write_frame.codec && write_frame.datalen) {
3242+
if ((ringback.fh || silence || ringback.audio_buffer || oglobals.bridge_early_media > -1) && write_frame.codec && write_frame.codec->implementation && write_frame.datalen) {
32433243
if (silence) {
32443244
write_frame.datalen = read_impl.decoded_bytes_per_packet;
32453245
switch_generate_sln_silence((int16_t *) write_frame.data, write_frame.datalen / 2, write_frame.codec->implementation->number_of_channels, silence);

0 commit comments

Comments
 (0)