[Asterisk-Users] Monitor does not like variable subsitutions {Scanned}

David Shaw asterisk at ke6upi.com
Wed Feb 16 13:54:44 MST 2005


Here is what I use for outbound calls.

exten => _1NXXNXXXXXX,1,SetVar(CALLFILENAME=${EXTEN:1}-${TIMESTAMP})
exten => _1NXXNXXXXXX,2,Monitor(wav,${CALLFILENAME},m)
exten => _1NXXNXXXXXX,3,Dial(${TRUNKL3}/${EXTEN})

David


On Wed, 2005-02-16 at 07:57 -0800, Jason Goecke wrote:
> 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).
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
-- 
David Shaw <asterisk at ke6upi.com>




More information about the asterisk-users mailing list