0

I'm trying to setup call recording in Asterisk applied to a whole context.

extensions.conf looks like this:

[office] exten => _068.,1,Dial(SIP/sip_trunk_1/${EXTEN}) exten => _073.,1,Dial(SIP/sip_trunk_1/${EXTEN}) exten => _099.,1,Dial(SIP/sip_trunk_1/${EXTEN})

I've tried to do something like this:

[office] exten => s,1,Set(filename=${STRFTIME(${EPOCH},,%Y/%m/%d/%H_%M_%S)}) exten => s,2,MixMonitor(${filename}.wav, b) exten => _068.,1,Dial(SIP/sip_trunk_1/${EXTEN}) exten => _073.,1,Dial(SIP/sip_trunk_2/${EXTEN}) exten => _099.,1,Dial(SIP/sip_trunk_3/${EXTEN}) exten => h,1,StopMixMonitor()

But it doesn't work, MixMonitor never starts.

The only way it works is by setting up MixMonitor separately for every single extention.

Is there any way to specify one global MixMonitor globally? Because I have a lot of extentions, and specifying separate recorder for each of them will mess up my configuration file.

Vit D
  • 101
  • 1

1 Answers1

0

The simplest way is to adjust your contexts slightly. Create a [office-start] context. And do something like this:

[office-start]

exten => _X.,1,Set(Filename=XYZ)

exten => _X.,n,MixMonitor()

exten => _X.,n,Goto(office,${exten},1)

Then set the context on your sip peers to office-start