Asterisk Queue MixMonitor

Why Asterisk is running MixMonitor application 2 times when is using queue application?

I have the following dialplan:

> exten => s,18,MSet(__DYNAMIC_FEATURES=pauseInboundMonitor#unpauseInboundMonitor,__MONITOR_FILENAME=test.wav,__MONITOR_EXEC=/bin/sh /scripts/ test.wav)
> exten => s,19,MixMonitor(${MONITOR_FILENAME},a,${MONITOR_EXEC})

At the end of the call i have:

DEBUG[19540][C-0000000c] res_monitor.c: monitor executing ....
DEBUG[19540][C-0000000c] res_monitor.c: monitor executing ....

and also 2 CDR inserts:

cdr_mysql.c: SQL command as follows: INSERT INTO cdr
cdr_mysql.c: SQL command as follows: INSERT INTO cdr

I that normal behavior?

Those messages appear to be coming from the “Monitor” application, not “MixMonitor”. They are two separate things. You’d need to provide more information and look at all of the dialplan to see what is going on.

I cleaned a bit my macro but the issue is still persisting:
This is how my macro is looking:

asterisk -rx 'dialplan show macro-Queue' | grep -i 'monitor'

  1. MSet(__DYNAMIC_FEATURES=pauseInboundMonitor#unpauseInboundMonitor,__MONITOR_FILENAME={var1}-{UNIQUEID}.wav,__MONITOR_EXEC=/bin/sh /home/scripts/ {var1}-{UNIQUEID}.wav) [pbx_config]
  2. MixMonitor({MONITOR_FILENAME},a,{MONITOR_EXEC}) [pbx_config]

grep -i 'monitor' /var/log/asterisk/full

[2018-11-10 17:03:07] VERBOSE[18940][C-00000040] app_mixmonitor.c: [2018-11-10 17:03:07] == Begin MixMonitor Recording SIP/101-00000089
[2018-11-10 17:03:24] DEBUG[18940][C-00000040] res_monitor.c: monitor executing /bin/sh /home/scripts/ 101-1541869386.141.wav “/var/spool/asterisk/monitor/101-1541869386.141.wav-in.wav” “/var/spool/asterisk/monitor/101-1541869386.141.wav-out.wav” “/var/spool/asterisk/monitor/101-1541869386.141.wav.wav” &
[2018-11-10 17:03:24] VERBOSE[18940][C-00000040] app_mixmonitor.c: [2018-11-10 17:03:24] == MixMonitor close filestream (mixed)
[2018-11-10 17:03:24] VERBOSE[18940][C-00000040] app_mixmonitor.c: [2018-11-10 17:03:24] == Executing [/bin/sh /home/scripts/ 101-1541869386.141.wav]
[2018-11-10 17:03:25] VERBOSE[18940][C-00000040] app_mixmonitor.c: [2018-11-10 17:03:25] == End MixMonitor Recording SIP/101-00000089
[2018-11-10 17:03:25] DEBUG[18940][C-00000040] app_mixmonitor.c: No recipients to forward monitor to, moving on.

So, it seems that on 17:03:24 is starting Monitor application, but why? I’m not calling this application anywhere in my dialplan. I even don’t have loaded this module:

asteriskCLI> core show application Monitor
Your application(s) is (are) not registered
Command ‘core show application Monitor’ failed.

asterisk*CLI> Queue(“SIP/101-00000095”, “101-1,rCt,30”)

In /var/spool/asterisk/monitor/ folder i have 3 files: 101-1541869386.141.wav, 101-1541869386.141.wav-in.wav, 101-1541869386.141.wav-out.wav

The issue was because of the queues.conf file.

uncomment this line (monitor-type = MixMonitor) in queues.conf and comment MixMonitor application in dialplan solved the issue, now MixMonitor application is executed only one time.

Thank You.

1 Like