# Detect second silence record file using agi

**URL:** <https://community.asterisk.org/t/detect-second-silence-record-file-using-agi/84940>\
**Category:** Asterisk APIs\
**Created:** [July 14, 2020, 2:10pm UTC](https://community.asterisk.org/t/detect-second-silence-record-file-using-agi/84940 "2020-07-14T14:10:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar.waloszczyk.chr](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/oscar.waloszczyk.chr/32/3632_2.png) [@oscar.waloszczyk.chr](https://community.asterisk.org/u/oscar.waloszczyk.chr)\
**Post date:** [July 14, 2020, 2:10pm UTC](https://community.asterisk.org/t/detect-second-silence-record-file-using-agi/84940/1 "2020-07-14T14:10:42Z")

</div>

Hi all,  
I am trying to make an agi application in ivr node js (javascript) with speech recognition, and I have two problems:

- When you record the client’s response I use RECORD FILE but it detects only one silence, is there a possibility that it detects two?
- I understand that in agi you can only execute one command simultaneously. There is the possibility of playing an audio (in the Background form) while making a record file.  
I have not tried using mix monitor.

Many thanks in advance.  
A greeting!

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [July 14, 2020, 3:22pm UTC](https://community.asterisk.org/t/detect-second-silence-record-file-using-agi/84940/2 "2020-07-14T15:22:56Z")

</div>

> [@oscar.waloszczyk.chr](#):
>
> possibility of playing an audio (in the Background form) while making a record file.  
> I have not tried using mix monitor.

This is usually done using chanspy and local channel

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 13, 2020, 3:26pm UTC](https://community.asterisk.org/t/detect-second-silence-record-file-using-agi/84940/3 "2020-08-13T15:26:22Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
