AutoMon only recording one way audio

I’m having trouble getting the automon feature (*1) to record inbound and outbound audio. My dial function contains both W and w, but that does not seem to make a difference. I only get the outbound (caller) audio and not the inbound (callee) audio.

I’ve tried to use the MixMonitor function instead and that worked for both audio streams, however, it records the whole call. Alternatively, I just want to be able to record a portion of the call when the caller presses *1 .

Any ideas on what I can do to get both streams of audio? Or any other suggestions on getting “on demand” recording to work.

Use following features & scripts for that requiremnt

In features.conf
plz add this
automon =>*1,callee,Macro,automon

in extension.conf
add this

Use following line in ur out going call context b4 Dial cmd or if u want to record incoming call u can set this line in ur incoming context also
exten => s,1,Set(DYNAMIC_FEATURES=automon)

then u need this also in extension.conf as macro

exten => s,1,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${CALLERID(num)})
exten => s,2,MixMonitor(${MONITOR_FILENAME}.wav,b,mv /var/spool/asterisk/monitor/^{MONITOR_FILENAME}.wav /var/spool/asterisk/monitor)

when u make any out calls & during Ongoing call if you want to record that complete call out & incoming Voice stream.
Just dial *1 Monitoring or Recording start & when u hangup it stop.
then u can get that file in Monitor directory of var/spool/asterisk

This may help you…

Ok, I tried what you suggested however, I noticed a few things. Please keep in mind, I did not set this system up and that person is no long available.

This is what I have:

automon => *1,callee,Macro,automon


Since all of our plan usings one macro, I had to edit the existing macro (macro_trunck) to allow certain callers in a particular department to use the automon feature. Here’s a portion of the macro…

;ARG1: Trunk
;ARG2: Number
;This Macro enables One Touch Recording on all Outbound Calls for those listed in the TELESALES department

exten => s,1,Set(TELESALES=6154)
exten => s,n,Set(ORIGIN=${CALLERID(num)})
exten => s,n,Noop(OutGoingCall,${UNIQUEID},${DATETIME},CID: ${CALLERID(all)} TRUNK:${ARG1} CALLING: ${ARG2})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${MACRO_EXTEN}-${CALLERID(num)})
exten => s,n,set(CALLERID(number)=${CID})
exten => s,n,Set(CALLERID(name)=${CIDNAME})
exten => s,n,GotoIf(${REGEX("${ORIGIN}" ${TELESALES})}?10:20)
exten => s,10,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${ORIGIN})
exten => s,11,MixMonitor(${MONITOR_FILENAME}.wav,b,mv /var/spool/asterisk/monitor/^{MONITOR_FILENAME}.wav /var/spool/asterisk/monitor)
exten => s,12,Dial(${ARG1}/${ARG2}|${TRUNKTIMEOUT})
exten => s,20,Dial(${ARG1}/${ARG2}|${TRUNKTIMEOUT})

With this configuration I noticed that the recording begins as soon as the call connects even if I do not press *1.

I did move “automon => *1,callee,Macro,automon” under the [applicationmap] in features.conf however, I need to restart in order for the change to take affect and I cannot do this during business hours.

Do you think moving this will make a difference?

So, after hours I was able to change features.conf and put automon under [applicationmap] section. After an asterisk restart something strange happened. I lost all audio on incoming calls.

I changed the features.conf to the previous settings and the incoming call audio returned.

I must be missing something. Could it be because the macro “macro-automon-11112” does not explicitly exist? Or am I missing something else?

Yes ur right if that 11112 is not form ur config u need to remove that & then check again
Also as i told u need to activate & use this Feature with setting this line in macro or incoming call context set it that also
exten => s,1,Set(DYNAMIC_FEATURES=automon) at first line.

Also remove automon##atxfer#parkcall only use with automon as i try only with Automon to record during on going conversation

all other config & ur config are ok. As per my knowldge no need to restart Asterisk just reload it form console.


I did insert Set(DYNAMIC_FEATURES=automon), however I was looking at the console and it seems to be looking for macro-automon when I press *1.

Since the line in the features.conf calls the macro “automon” I believe I need that macro in the extension.conf (as you said earlier). However, since all our outbound calling using the macro-trunk that would mean I would have to call the macro-automon within the macro-trunk.

Will that work? Can I have a macro within another macro?

Sorry I answered my own question… :smile:

“macros are limited to 7 levels of nesting (macro calling macro calling macro, etc.);” … macro.html

I will attempt this and let you know how it goes.

I did everything you said, however, whenever I enable the automon in the feature.conf file incoming calls lose their audio. For example, if a caller places a phone call to us they can hear us but we cannot hear them.

I’ve tried different key codes (i.e. *1,*9,#3) but the same thing still occurs.

Any ideas?

So after banging my head on my keyboard a few times (as well as a few configuration changes), I was able to get automon to work (kinda).

I added both W and w to my dial plan. Then I noticed something interesting. If the callee (person who receives the call) presses *1 both streams of the conversations are recorded. However, if the caller (the asterisk user making the call) presses *1 automon only records the caller audio stream and not the callee auto stream.

If i just leave W in the dial plan, automon still leaves out the callee audio stream.

Does anyone know why this would be happening?

I am having a very different problem with automon.

Did everything right. activate automon on features.conf, inserted DYNAMIC_FEATURES=automon and even managed to change the directory location from /var/spool/asterisk/monitor to where i wanted it go.

But the problem i am getting is as soon as i press *1 on a outgoing or incoming call i am getting a crappy voice. Its like all scrammbled. It works fine with my internal extension calls.

Any ideas why this is happening? I am using asterisk 1.4.14.