# Asterisk bridge recorder (ARI)

**URL:** <https://community.asterisk.org/t/asterisk-bridge-recorder-ari/93026>\
**Category:** Asterisk APIs\
**Created:** [June 16, 2022, 8:53am UTC](https://community.asterisk.org/t/asterisk-bridge-recorder-ari/93026 "2022-06-16T08:53:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lequocthinh](https://avatars.discourse-cdn.com/v4/letter/l/71c47a/32.png) [@lequocthinh](https://community.asterisk.org/u/lequocthinh)\
**Post date:** [June 16, 2022, 8:53am UTC](https://community.asterisk.org/t/asterisk-bridge-recorder-ari/93026/1 "2022-06-16T08:53:24Z")

</div>

Hello everyone. I’m new to asterisk, my company is developing a voice-bot based on AI.  
The problem is when I record the audio of the call, sometimes the audio file misses user’s voice. For an instance:

Our voice-bot: ‘Hello how can I help you today?’  
**User: ‘I’m good’**  
Our voice-bot: ‘What can I help you?’  
**User: ‘Tell me about the weather today!’** → [This one can’t hear from full audio record a Bridge (with have a snoop channel in it)]

Here’s my code:  
[https://pastecode.io/s/f8gejj6d](https://pastecode.io/s/f8gejj6d)

So I create a snoop channel for recording audio, **bridgeRecorder**.record() will record the conversation to a file. **externalChannel** is for streaming audio stream to a Speech To Text server.

So I decided to separate recording into two part, **bridgeRecorder** will record our bot audio and **bridgeIn** will record user’s audio. And then I’ll merge two files into one file.  
Separate into two part: [Untitled (j7pos5a6) - PasteCode.io](https://pastecode.io/s/j7pos5a6)

But the problem is, when I record on bridgeIn, the audio stream keep sending to externalService when our bot’s saying (playback wav file). So how can I pause streaming audio (using audiosocket) when our bot is playback the sound, and then start it again when it’s users turn.

Thanks in advance.

---

<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:** [July 16, 2022, 8:54am UTC](https://community.asterisk.org/t/asterisk-bridge-recorder-ari/93026/2 "2022-07-16T08:54:17Z")

</div>

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