Summary:ASTERISK-18214: MixMonitor not parsing string variables
Reporter:mbrevda (lazytt)Labels:
Date Opened:2011-07-31 05:33:17Date Closed:2012-01-06 13:14:04.000-0600
Status:Closed/CompleteComponents:Applications/app_mixmonitor Documentation
Versions: Frequency of
Description:core show application MixMonitor states:
Any strings matching '^{X}' will be unescaped to ${X}
But it doesn't seem to be parsing. Using the following string \^{STRFTIME(^{EPOCH},,%Y/%m/%d)} for MIXMON_DIR (dialplan set global MIXMON_DIR \^{STRFTIME(^{EPOCH},,%Y/%m/%d)}) or even just using the string directly (i.e. MixMonitor(\^{STRFTIME(^{EPOCH},,%Y/%m/%d)}...))
Comments:By: mbrevda (lazytt) 2011-08-23 06:12:24.944-0500

It seems that part of the issue stems from the help text not being as clear as it could be. I was under the impression that ^ would parse in ANY part of mixmon - seems it only parses for the POST variable. So, either the help text needs to be clearer, or, preferably, mixmon should support parsing in ANY part of the variables, so that something like this gets parsed at call time - not at dialplan reload time: ${STRFTIME(${EPOCH},,%Y/%m/%d)}

By: Leif Madsen (lmadsen) 2011-08-30 15:30:19.993-0500

Updating this as this is a documentation issue.

By: Matt Jordan (mjordan) 2011-12-22 16:24:22.536-0600

In Asterisk 1.8.8 and later, the variables are parsed when the MixMonitor thread is spawned to begin recording.  This would occur when the MixMonitor application is executed, not when the dialplan itself is loaded and parsed.

I confirmed this using your example.  The help contents do note: "All variables will be evaluated at the time MixMonitor is called." - which is what happens.

Let me know if I'm confusing the issue - but right now I can't see what exactly should be changed in the documentation to clear up the behavior.