Код: Выделить всё
[macro-queue]
exten => s,1,Set(DB(${CHANNEL}/file)=${RECORD-DIR}/${ARG2}/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},,%h)}/${STRFTIME(${EPOCH},,%d)}/${STRFTIME(${EPOCH},,%H.%M.S)}_${CALLERID(num)})
exten => s,n,Set(MONITOR_FILENAME=${DB(${CHANNEL}/file)})
exten => s,n,Queue(${ARG2},t,90)
exten => e,1,Hangup
exten => h,1,StopMixMonitor
exten => h,n,Set(MONITOR_FILENAME=${DB_DELETE(${CHANNEL}/file)})
exten => h,n,Set(FILE=${MONITOR_FILENAME}_${MEMBERINTERFACE:4})
exten => h,n,System(mv ${MONITOR_FILENAME}.alaw ${FILE}.alaw)
exten => h,n,DBdeltree(${CHANNEL})
exten => h,n,Hangup