Unable to turn off recording on selected extensions

I’m running FreePBX and I’m trying to make sure that call recording doesn’t happen with certain extensions. In my testing I have setup up a DID number that goes directly to a specific phone extension. The inbound route is set as follows:

Inbound Route for DID Number
Call Recording - Never

Extension Settings
Inbound External Calls - Never
Outbound External Calls - Never
Inbound Internal Calls - Never
Outbound Internal Calls - Never
On Demand Recording - Enable

If I call out to an external number, it does NOT record the call. Which is what I would expect.

I can’t figure out why it still records when I call the DID number. Any suggestions?

It should not. You sure it’s actually recording.

Positive. I go into the Call Recordings report and it’s right there.

Can you post a call log?

OK, I think I figured it out. We had a consultant write a custom context for us so that we could record calls in stereo. So in the SIP settings for our trunks in the incoming we have “context=test-custom” and that sends those inbound calls to that context which is in extensions_custom.conf. It looks as follows:

exten => _.,1,answer()
exten => _.,2,Set(NOW=${EPOCH})
exten => _.,3,Set(DAY=${STRFTIME(${NOW},%d)})
exten => _.,4,Set(MONTH=${STRFTIME(${NOW},%m)})
exten => _.,5,Set(YEAR=${STRFTIME(${NOW},%Y)})
exten => _.,6,Set(TIMESTR=${YEAR}${MONTH}${DAY}-${STRFTIME(${NOW},%H%M%S)})
exten => _.,7,Set(MON_FMT=${IF($[“${MIXMON_FORMAT}”=“wav49”]?WAV:${MIXMON_FORMAT})})
exten => _.,8,Set(CALLTYPE=external)
exten => _.,10,Monitor(${MON_FMT},${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME},m)
exten => _.,11,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
exten => _.,12,Goto(from-trunk,${EXTEN},1)

So now my question becomes, how can I place a conditional at the beginning of the test-custom context that basically says, if it’s a DID number or a corp extension, don’t record. We have our extensions organized such that 2XX are our corporate users and 12XX and 13XX is Sales and Collections respectively.

Any suggestions in that regard?

I’m thinking that I could add the following line to the top of the test-custom context just below the answer() line.

exten=> _.,2,GotoIf($[“${EXTEN}”=“2XX”]?from-trunk)

Does that make sense?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.