Код: Выделить всё
exten => h,n,MYSQL(Query resultid ${connid} INSERT INTO stat (pnumber,agent,date,queue,status,time,holdtime,record)VALUES('${CALLERID(number)}','${MEMBERNAME}','${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}','${QUEUENAME}','Отвечен','${CDR(billsec)}','${QUEUEHOLDTIME}','ftp://10.254.252.25/supportarch/${STRFTIME(${EPOCH},,%m.%Y)}/${STRFTIME(${EPOCH},,%d.%m)}/${filename}.gsm'))