]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7771 #resolve
authorkarl anderson <karl@2600hz.com>
Thu, 2 Apr 2015 23:03:41 +0000 (19:03 -0400)
committerLuis Azedo <luis@2600hz.com>
Fri, 3 Jul 2015 09:36:58 +0000 (10:36 +0100)
set a channel var if the recording is terminated due to silence hits

src/switch_ivr_play_say.c

index 506597b26308e08611172c6853c588e64b9011de..efd0fbaa0ed0c3e5fde9dd45e10e5977a565dff3 100644 (file)
@@ -604,6 +604,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
                switch_channel_set_variable(channel, "RECORD_DATE", NULL);
        }
 
+       switch_channel_set_variable(channel, "silence_hits_exhausted", "false");
+
        if (!asis) {
                codec_name = "L16";
                if (switch_core_codec_init(&codec,
@@ -761,6 +763,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
 
                        if (score < fh->thresh) {
                                if (!--fh->silence_hits) {
+                                       switch_channel_set_variable(channel, "silence_hits_exhausted", "true");
                                        break;
                                }
                        } else {