# The audio is not recorded

**URL:** <https://community.asterisk.org/t/the-audio-is-not-recorded/93615>\
**Category:** Asterisk Support\
**Created:** [August 5, 2022, 6:32pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615 "2022-08-05T18:32:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcos\_p](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@marcos\_p](https://community.asterisk.org/u/marcos_p)\
**Post date:** [August 5, 2022, 6:32pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615/1 "2022-08-05T18:32:39Z")

</div>

The audio from the file ligacaoseragravada.alaw is played to the caller but the audio is not recorded in the file generated by MixMonitor.  
Is there any way to also record the contents of the file ligacaoseragravada.alaw in the file generated by MixMonitor?

context inicioAtendimentoAtendente{  
s =\> {  
ano = ${STRFTIME(${EPOCH},%Y)};  
mes = ${STRFTIME(${EPOCH},%m)};  
dia = ${STRFTIME(${EPOCH},%d)};  
Set(nomeArquivo=/opt/asterisk/gravacoes/${ano}/${mes}/${dia}/${FILTER(0-9,${origem})}_${ano}${mes}${dia}_${STRFTIME(${EPOCH},%H%M%S)}_${CDR(uniqueid)}_.ogg);  
MixMonitor(${nomeArquivo},b);  
}  
}

\_XXXX =\> {  
Answer();  
Queue(setor2,R,protocolo.agi,inicioAtendimentoAtendente);  
}

## protocolo.agi

#!/usr/bin/python  
import sys  
comando=‘EXEC Playback ligacaoseragravada.alaw \n’  
sys.stdout.write(comando)  
sys.stdout.flush()

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [August 5, 2022, 7:25pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615/2 "2022-08-05T19:25:42Z")

</div>

Don’t use the b option.

However, assuming AEL doesn’t do anything strange (please provide dialplan show output, so we can see the compiled dialplan), your parameters don’t align with the correct positions for positional parameters, and, even if they did, your subroutine may well get run after the AGI script (I suspect it runs things in the same order as the parameters, but might not). This all looks over-complicated to me.

The sensible place to put the MixMonitor is in the \_XXXX extension, before Queue.

Your AGI script is cutting corners. You will probably get away with it, possibly with some warning messages, probably broken pipes, but you really should read out the initial parameters, and read and check the responses to the actions.

---

<div class="post-metadata">

**Author:** ![marcos\_p](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@marcos\_p](https://community.asterisk.org/u/marcos_p)\
**Post date:** [August 5, 2022, 8:50pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615/3 "2022-08-05T20:50:45Z")

</div>

If you don’t use option b, it records all the time that was delivered in the queue, and I don’t want that.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [August 5, 2022, 8:58pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615/4 "2022-08-05T20:58:11Z")

</div>

If you do include it, it won’t record anything unless the two parties can talk to each other.

---

<div class="post-metadata">

**Author:** ![marcos\_p](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@marcos\_p](https://community.asterisk.org/u/marcos_p)\
**Post date:** [August 9, 2022, 12:22pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615/5 "2022-08-09T12:22:27Z")

</div>

David551 good morning, I removed option b and the mixmonitor started to also record the music on hold while the caller waits in the queue, and I don’t want that. I put the MixMonitor before Queue

---

<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:** [September 8, 2022, 12:23pm UTC](https://community.asterisk.org/t/the-audio-is-not-recorded/93615/6 "2022-09-08T12:23:23Z")

</div>

Closed on September 8, 2022, 12:23pm UTC

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