# Help with MixMonitor and Asterisk 1.4x

**URL:** <https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149>\
**Category:** Asterisk Support\
**Created:** [July 29, 2011, 11:27am UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149 "2011-07-29T11:27:40Z")\
**Posts on this page:** 7\
**Page:** 1

<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 29, 2011, 11:27am UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/1 "2011-07-29T11:27:40Z")

</div>

Hi,

I have an Asterisk 1.4x Debian based Asterisk Server and I want to introduce call recording on a selective basis. The customer will be advised that a recording will take place. Recording based per extension if possible.

I have researched and tried so many things that I am now desperate. I cannot get Asterisk to initiate the recording. I have changed Extensions.conf, SIP.conf, features.conf, all to no avail. (All reset now)  
Could someone who has successfully managed to get this working please help?  
Ideally, I ultimately want to be able to control this through the AMI but I cannot get it to work at all.

Any help would be greatly appreciated.

Don

---

<div class="post-metadata">

**Author:** ![mazzic](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/mazzic/32/448_2.png) [@mazzic](https://community.asterisk.org/u/mazzic)\
**Post date:** [July 30, 2011, 3:14pm UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/2 "2011-07-30T15:14:48Z")

</div>

posting some extracts of what you tried would show others how your trying to accomplish this and if there are an visible errors in the coding/settings.

MixMonitor should be a simple task. Mind you I have not actually had a need to use it. I handle my recordings from the queues. When an agent takes the call, it is recorded.

In your dialplan you should just have to say, MixMonitor prior to connecting to the channels.

exten =\> 100,1,Answer  
exten =\> 100,n,MixMonitor(somefile.wav,b)  
exten =\> 100,n,Dial(SIP/300,15)  
exten =\> 100,n,Hangup

---

<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 2, 2011, 8:35am UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/3 "2011-08-02T08:35:24Z")

</div>

I have modified the extensions.conf to include the lines you have shown, substituting my own extension but it does not work.  
No file is created in the directory /var/spool/asterisk/monitor. The default directory has been verified as correct.  
Following advice elsewhere on the net, I modified features.conf to include the line  
automon =\> \*1  
It did not record when I pressed the \*1 keys.

I added the following line to extensions.conf under [globals]  
DYNAMIC\_FEATURES=automon  
and added the “wW” as a switch e.g.  
exten =\> 215,1,Dial(SIP/215,wW)

None of the above worked so I took them back out again.

I have also read that I need to have the command StopMixMonitor() but I don’t know where this should go.

Thanks for taking to time to help.

Don

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [August 2, 2011, 8:47am UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/4 "2011-08-02T08:47:51Z")

</div>

With those options, the user must dial a sequence to start monitoring.

For simple recording, you call MixMonitor before you dial.

---

<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 2, 2011, 4:32pm UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/5 "2011-08-02T16:32:23Z")

</div>

I tried it with MixMonitor on it’s own before making the changes that required the user to enter a key combination.  
For some reason, it isn’t creating the recording.

---

<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 2, 2011, 4:49pm UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/6 "2011-08-02T16:49:32Z")

</div>

Hi,  
You can add some lines in your extensions, i think it can help you.

[code]exten =\> 2,1,Answer()  
exten =\> 2,2,Set(Name=${CALLERID(num)})  
exten =\> 2,n,Mixmonitor(/home/temp/${Name}.wav,v(2)V(-2),); show the directory to store recorded file. Option v and V you can refer in asterisk wiki  
exten =\> 2,n,BackGround(/home/temp/${ThemeSong});replacing ThemeSong with one song’s name, I use Background to play a song because we can press the other button to stop the mixmonitor  
exten =\> 2,n,StopMixmonitor()  
exten =\> 2,n,Wait(3)  
exten =\> 2,n,Playback(/home/temp/${Name}); Checking the recorded file.  
exten =\> 2,n,Hangup()

exten =\> i,1,StopMixmonitor()  
exten =\> i,n,Wait(3)  
exten =\> i,n,Playback(/home/temp/${Name}); Checking the recorded file.  
exten =\> i,n,Hangup()[/code]

---

<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 8, 2011, 4:03pm UTC](https://community.asterisk.org/t/help-with-mixmonitor-and-asterisk-1-4x/36149/7 "2011-08-08T16:03:04Z")

</div>

I found that there were entries in the agents.conf file that were stopping the recording.  
I set the following in agents.conf and it worked:

recordagentcalls=yes  
recordformat=gsm

Thanks everyone.  
Now I can start to tweak it to what I want exactly.

Cheers!
