[Asterisk-Users] Monitor does not like variable subsitutions

Jason Goecke jsgoecke at yahoo.com
Wed Feb 16 08:57:14 MST 2005


Hello,

I have been attempting to get the Monitor function to
accept a loal variable substitution in order to use
the same filename later in the same context.  Monitor
does not appear to like it, as it attempts to use
wav|filename as the recording type, as opposed to just
wav.

Here is what I get if I just supply a filename
directly (it works fine):

--context-----------------------------
exten => _9X.,3,Monitor(wav|recording|m)
--context-----------------------------

--CLI---------------------------------
    -- Executing SetVar("SIP/3004-275c",
"REC_FILE_NAME=rec_to_448704386865_at_16022005-16:54:10")
in new stack
    -- Executing Monitor("SIP/3004-275c",
"wav|recording|m") in new stack
    -- Executing AGI("SIP/3004-275c", "outbound.agi")
in new stack
--CLI---------------------------------

Here is what I get when I attempt to to variable
substituion for the filename:


--context-----------------------------
exten =>
_9X.,2,SetVar(REC_FILE_NAME=rec_to_${EXTEN:1}_at_${DATETIME})
exten => _9X.,3,Monitor(wav|${FILENAME}|m)
--context-----------------------------

--CLI---------------------------------
    -- Executing SetVar("SIP/3004-da21",
"REC_FILE_NAME=rec_to_448704386865_at_16022005-16:56:35")
in new stack
    -- Executing Monitor("SIP/3004-da21",
"wav|rec_to_448704386865_at_16022005-16:56:35|m") in
new stack
Feb 16 16:56:35 WARNING[17028]: file.c:934
ast_writefile: No such format
'wav|rec_to_448704386865_at_16022005-16'
Feb 16 16:56:35 WARNING[17028]: res_monitor.c:154
ast_monitor_start: Could not create file
/var/spool/asterisk/monitor/m-in
Feb 16 16:56:35 WARNING[17028]: res_monitor.c:300
ast_monitor_change_fname: Cannot change monitor
filename of channel SIP/3004-da21 to m, monitoring not
started    -- Executing AGI("SIP/3004-da21",
"outbound.agi") in new stack
--CLI---------------------------------

I do believe that I had this working before (I am
running the CVS HEAD from yesterday).



More information about the asterisk-users mailing list