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:
[test-custom]
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 => _.,9,Set(CALLFILENAME=${CALLTYPE}-${CALLERID(dnid)}-${CALLERID(num)}-${TIMESTR}-${UNIQUEID})
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?