Sir,
I have use monitor to record call and when call finish on the basis i have add record file name in script and and of the day when we excute this script than it will transfer record file from /var/spool/asterisk/monitor directory to /home/asterisk all is working fine except i have seen the record file is more than record in script means all record information will not store in script below is the extensions.conf setting. will you please guide whats wrong or missing so all information will not store in script.
exten => s,1,Set(CALLFILENM=${CALLERID(num)}-${STRFTIME(${EPOCH},%d-%m-%Y-%T)},CALLTI=${STRFTIME(${EPOCH},%d-%m-%Y-%T)},AAJ=${STRFTIME(${EPOCH},%d-%m-%Y)})
exten => s,2,Monitor(wav,${CALLFILENM},m)
exten => s,3,SIPAddHeader(Alert-Info: )
exten => s,4,Dial(SIP/21&SIP/23&SIP/12&SIP/14,40,Tt)
exten => s,5,Dial(SIP/16,10,Tt)
exten => s,6,Playback(vm-nobodyavail)
exten => s,7,Hangup()
exten => h,1,Set(TST=${CDR(dstchannel):4:2})
exten => h,2,System(echo “/bin/cp /var/spool/asterisk/monitor/${CALLFILENM}.wav /home/asterisk/${TST}-${CALLTI}.wav” >> /tmp/${AAJ}.record)
exten => s,103,Dial(SIP/16,10,Tt)
exten => s,104,Dial(SIP/0,10,Tt)
exten => s,105,Playback(vm-isonphone)
exten => s,106,Hangup()
exten => h,1,Set(TST=${CDR(dstchannel):4:2})
exten => h,2,System(echo “/bin/cp /var/spool/asterisk/monitor/${CALLFILENM}.wav /home/asterisk/${TST}-${CALLTI}.wav” >> /tmp/${AAJ}.record)
exten => s,204,Dial(SIP/9,20,Tt)
exten => s,205,Playback(vm-isonphone)
exten => s,206,Hangup()
exten => h,1,Set(TST=${CDR(dstchannel):4:2})
exten => h,2,System(echo “/bin/cp /var/spool/asterisk/monitor/${CALLFILENM}.wav /home/asterisk/${TST}-${CALLTI}.wav” >> /tmp/${AAJ}.record)
Rajeev.