I’m monitoring calls in my dialplan using:
exten = s,1,Monitor(gsm,m)
this works fine but I would like to change the file name. I tried the following:
exten = s,1,SetVar(CALLFILENAME=${CALLERID(num)}-${CHANNEL}-${TIMESTAMP})
exten = s,n,Monitor(gsm,${CALLFILENAME},m)
Then I get an error in the CLI specifying that asterisk is unable to create the file so the call will not be monitored.
this monitor all incoming & out calls as per you need & no need use TIMESTAMP option. Store in var/spool/asterisk/monitor in 1113 folder . you have to make dir. in monitor.try if want with ${CHANNEL} BUT DONT THINK IT WILL WORK
as you mention ur using 1.2 so check some variables.