exten => _XXX,1,Dial(SIP/${EXTEN},,tTU(crm^s^1))
[crm]
exten => s,1,NoOp(=${CALLERID(num)}=${EXTEN}=)
exten => s,n,GotoIf(${DB_EXISTS(NORECNUM/${CALLERID(num)})}?gtme)
exten => s,n,GotoIf(${DB_EXISTS(NORECNUM/${EXTEN})}?gtme)
exten => s,n,Set(F=/var/spool/asterisk/calls/${STRFTIME(${EPOCH},,%Y%m)}/${STRFTIME(${EPOCH},,%Y%m%d)}/${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)}-${ARG1}-${ARG2})
exten => s,n,MixMonitor(${F}.wav,W(1),lame -b 16 ${F}.wav ${F}.mp3 && rm ${F}.wav)
exten => s,n(gtme),Return