โดย smuchcha » 30 มิ.ย. 2011 19:36
เรียนคุณ Nuiz
ผมแก้ไขชื่อ file ได้แล้วครับ ผมทำดังนี้คัรบ
######### Custome file name of call recording for internal call################################
#edit by pum
#File: extensions_override_freepbx.conf
#
[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = ""]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),ExecIf($["${ARG1}"=""]?MacroExit())
exten => s,n,GotoIf($["${ARG2}"="Group"]?Group:OUT)
exten => s,n(Group),Set(LOOPCNT=${FIELDQTY(ARG1,-)})
exten => s,n,Set(ITER=1)
exten => s,n(begin),GotoIf($["${CUT(DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording),=,3)}" != "Always"]?continue)
exten => s,n,Set(TEXTEN=${CUT(ARG1,-,${ITER})})
exten => s,n,Noop(Recording enable for ${TEXTEN})
exten => s,n,Set(CALLFILENAME=g${TEXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(continue),Set(ITER=$[${ITER}+1])
exten => s,n,GotoIf($[${ITER}<=${LOOPCNT}]?begin)
exten => s,n(OUT),GotoIf($["${ARG2}"="IN"]?IN)
exten => s,n,ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),|,1):4}" != "Always"]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(IN),ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),|,2):3}" != "Always"]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-From${AMPUSER}-To${ARG1}-${UNIQUEID})
exten => s,n(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST})
exten => s,n,Set(CDR(userfield)=audio:${CALLFILENAME}.${MIXMON_FORMAT})
exten => s,n,MacroExit()
### Custome file name of call recording for out to pstn ####################################################################
#
#edit
nano /etc/asterisk/extensions_additional.conf
# edit in file #
# edit marcor of route outgoing #
[outrt-001-9_PSTN]
include => outrt-001-9_PSTN-custom
exten => _9X.,1,Macro(user-callerid,SKIPTTL,)
exten => _9X.,n,Set(_NODEST=)
;edit by pum
;exten => _9X.,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _9X.,n,Macro(record-enable,${AMPUSER},OUT,,${EXTEN:1})
exten => _9X.,n,Macro(dialout-trunk,2,${EXTEN:1},,)
exten => _9X.,n,Macro(dialout-trunk,1,${EXTEN:1},,)
exten => _9X.,n,Macro(outisbusy,)
; end of [outrt-001-9_PSTN]
#edit by pum
#File: extensions_override_freepbx.conf
#
[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = ""]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),ExecIf($["${ARG1}"=""]?MacroExit())
exten => s,n,GotoIf($["${ARG2}"="Group"]?Group:OUT)
exten => s,n(Group),Set(LOOPCNT=${FIELDQTY(ARG1,-)})
exten => s,n,Set(ITER=1)
exten => s,n(begin),GotoIf($["${CUT(DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording),=,3)}" != "Always"]?continue)
exten => s,n,Set(TEXTEN=${CUT(ARG1,-,${ITER})})
exten => s,n,Noop(Recording enable for ${TEXTEN})
exten => s,n,Set(CALLFILENAME=g${TEXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(continue),Set(ITER=$[${ITER}+1])
exten => s,n,GotoIf($[${ITER}<=${LOOPCNT}]?begin)
exten => s,n(OUT),GotoIf($["${ARG2}"="IN"]?IN)
exten => s,n,ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),|,1):4}" != "Always"]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-From${AMPUSER}-To${ARG4}-${UNIQUEID})
exten => s,n,Goto(record)
exten => s,n(IN),ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),|,2):3}" != "Always"]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-From${AMPUSER}-To${ARG1}-${UNIQUEID})
exten => s,n(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST})
exten => s,n,Set(CDR(userfield)=audio:${CALLFILENAME}.${MIXMON_FORMAT})
exten => s,n,MacroExit()
### bug download file of record call when you use mode on deman #######
#edit by pum
#File: extensions_override_freepbx.conf
#
[macro-hangupcall]
include => macro-hangupcall-custom
exten => s,1,GotoIf($["${TOUCH_MONITOR_OUTPUT}" = ""]?noautomon)
;edit by pum
;exten => s,n,Set(CDR(userfield)=audio:${TOUCH_MONITOR_OUTPUT}.${MIXMON_FORMAT})
exten => s,n,Set(CDR(userfield)=audio:${TOUCH_MONITOR_OUTPUT}.wav)
exten => s,n(noautomon),Noop(TOUCH_MONITOR_OUTPUT=${TOUCH_MONITOR_OUTPUT})
exten => s,n(start),GotoIf($["${USE_CONFIRMATION}"="" | "${RINGGROUP_INDEX}"="" | "${CHANNEL}"!="${UNIQCHAN}"]?skiprg)
exten => s,n,Noop(Cleaning Up Confirmation Flag: RG/${RINGGROUP_INDEX}/${CHANNEL})
exten => s,n(delrgi),Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL} ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
exten => s,n(skiprg),GotoIf($["${BLKVM_BASE}"="" | "BLKVM/${BLKVM_BASE}/${CHANNEL}"!="${BLKVM_OVERRIDE}"]?skipblkvm)
exten => s,n,Noop(Cleaning Up Block VM Flag: ${BLKVM_OVERRIDE})
exten => s,n(delblkvm),Noop(Deleting: ${BLKVM_OVERRIDE} ${DB_DELETE(${BLKVM_OVERRIDE})})
exten => s,n(skipblkvm),GotoIf($["${FMGRP}"="" | "${FMUNIQUE}"="" | "${CHANNEL}"!="${FMUNIQUE}"]?theend)
exten => s,n(delfmrgp),Noop(Deleting: FM/DND/${FMGRP}/${CHANNEL} ${DB_DELETE(FM/DND/${FMGRP}/${CHANNEL})})
exten => s,n(theend),Hangup