Answer the question
In order to leave comments, you need to log in
How to record calls from trunk?
Good afternoon, I can’t figure out how to write a macro to record a conversation in extension. The macro itself:
[macro-crm]
exten => s,1,NoOp(${ARG1} ${ARG2})
exten => s,n,GotoIf(${DB_EXISTS(NORECNUM/${ARG1})}?gtme)
exten => s,n,GotoIf(${DB_EXISTS(NORECNUM/${ARG2})}?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),MacroExit
[call-in]
exten => 8XXXXXXXXX,1,Dial(SIP/102)
you need to record a call with such a scheme. exten => _XXX,1,Dial(SIP/${EXTEN},,tTM(crm^${CALLERID(num)}^${EXTEN}))
Answer the question
In order to leave comments, you need to log in
"everything is written on internal numbers:
exten => _XXX,1,Dial(SIP/${EXTEN},,tTM( crm ^${CALLERID(num)}^${EXTEN}))"
crm is indicated here, but not there .
try
exten => 8XXXXXXXXX,1,Dial(SIP/102,,tTM( crm ^${CALLERID(num)}^${EXTEN})))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question