A
A
Anton Ulanov2018-07-18 18:31:48
Asterisk
Anton Ulanov, 2018-07-18 18:31:48

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

and here is the setting for incoming calls:
[call-in]
exten => 8XXXXXXXXX,1,Dial(SIP/102)
you need to record a call with such a scheme.
on internal numbers everything is written:
exten => _XXX,1,Dial(SIP/${EXTEN},,tTM(crm^${CALLERID(num)}^${EXTEN}))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Makarov, 2018-07-19
@antonsr98

"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 question

Ask a Question

731 491 924 answers to any question