Was this page helpful?

HUDlite 無法將來電轉到語音信箱

    內容表格
    沒有標頭

    Issue Description:
    HUDlite can't forward the calls to voicemail when calls come from RingGroup.

    Solution:
    Elastix UI > PBX > Tools > File Editor > File: extensions_override_freepbx.conf

    Copy & paste the context below, yellow words are what I added.

    ; fix the HUDlite can't send call to voicemail via Ring Group
    [macro-vm]
    include => macro-vm-custom
    exten => s,1,Macro(user-callerid,SKIPTTL)
    exten => s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")})
    exten => s,n,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => s,n,GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?vmx,1)
    exten => s,n,Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)})
    exten => s,n,Hangup
    exten => vmx,1,GotoIf($["${ARG2}"="NOMESSAGE"]?s-${ARG2},1)
    exten => vmx,n,Set(MODE=${IF($["${ARG2}"="BUSY"]?busy:unavail)})
    exten => vmx,n,GotoIf($["${ARG2}" != "DIRECTDIAL"]?notdirect)
    exten => vmx,n,Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = "1"]?busy:${MODE})})
    exten => vmx,n(notdirect),Noop(Checking if ext ${ARG1} is enabled: ${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)})
    exten => vmx,n,GotoIf($["${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}" != "enabled"]?s-${ARG2},1)
    exten => vmx,n,Macro(get-vmcontext,${ARG1})
    exten => vmx,n,GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/temp.wav)} = 1) || (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/temp.WAV)} = 1)]?tmpgreet)
    exten => vmx,n,GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.wav)} = 0) && (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.WAV)} = 0)]?nofile)
    exten => vmx,n,Set(LOOPCOUNT=0)
    exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/repeat)}" = "0"]?vmxtime)
    exten => vmx,n,Set(VMX_REPEAT=${DB_RESULT})
    exten => vmx,n(vmxtime),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timeout)}" = "0"]?vmxloops)
    exten => vmx,n,Set(VMX_TIMEOUT=${DB_RESULT})
    exten => vmx,n(vmxloops),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loops)}" = "0"]?vmxanswer)
    exten => vmx,n,Set(VMX_LOOPS=${DB_RESULT})
    exten => vmx,n(vmxanswer),Answer
    exten => vmx,n(loopstart),Read(ACTION,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE},1,skip,${VMX_REPEAT},${VMX_TIMEOUT})
    exten => vmx,n,GotoIf($["${EXISTS(${ACTION})}" = "1"]?checkopt)
    exten => vmx,n(noopt),Noop(Timeout: going to timeout dest)
    exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_TIMEOUT})
    exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/timeout)}" = "0"]?chktime)
    exten => vmx,n,Set(VMX_OPTS=${DB_RESULT})
    exten => vmx,n(chktime),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/ext)}" = "0"]?dotime)
    exten => vmx,n,Set(VMX_TIMEDEST_EXT=${DB_RESULT})
    exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/context)}" = "0"]?timepri)
    exten => vmx,n,Set(VMX_TIMEDEST_CONTEXT=${DB_RESULT})
    exten => vmx,n(timepri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/pri)}" = "0"]?dotime)
    exten => vmx,n,Set(VMX_TIMEDEST_PRI=${DB_RESULT})
    exten => vmx,n(dotime),Goto(${VMX_TIMEDEST_CONTEXT},${VMX_TIMEDEST_EXT},${VMX_TIMEDEST_PRI})
    exten => vmx,n(checkopt),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/ext)}" = "1"]?doopt)
    exten => vmx,n,GotoIf($["${ACTION}" = "0"]?o,1)
    exten => vmx,n,GotoIf($["${ACTION}" = "*"]?adef,1)
    exten => vmx,n,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1])
    exten => vmx,n,GotoIf($[${LOOPCOUNT} > ${VMX_LOOPS}]?toomany)
    exten => vmx,n,Playback(pm-invalid-option&please-try-again)
    exten => vmx,n,Goto(loopstart)
    exten => vmx,n(toomany),Noop(Too Many invalid entries, got to invalid dest)
    exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_LOOPS})
    exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/loops)}" = "0"]?chkloop)
    exten => vmx,n,Set(VMX_OPTS=${DB_RESULT})
    exten => vmx,n(chkloop),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/ext)}" = "0"]?doloop)
    exten => vmx,n,Set(VMX_LOOPDEST_EXT=${DB_RESULT})
    exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/context)}" = "0"]?looppri)
    exten => vmx,n,Set(VMX_LOOPDEST_CONTEXT=${DB_RESULT})
    exten => vmx,n(looppri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/pri)}" = "0"]?doloop)
    exten => vmx,n,Set(VMX_LOOPDEST_PRI=${DB_RESULT})
    exten => vmx,n(doloop),Goto(${VMX_LOOPDEST_CONTEXT},${VMX_LOOPDEST_EXT},${VMX_LOOPDEST_PRI})
    exten => vmx,n(doopt),Noop(Got a valid option: ${DB_RESULT})
    exten => vmx,n,Set(VMX_EXT=${DB_RESULT})
    exten => vmx,n,GotoIf($["${VMX_EXT}" != "dovm"]?getdest)
    exten => vmx,n(vmxopts),Set(VMX_OPTS=${VMX_OPTS_DOVM})
    exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/dovm)}" = "0"]?vmxdovm)
    exten => vmx,n(vmxopts),Set(VMX_OPTS=${DB_RESULT})
    exten => vmx,n(vmxdovm),Goto(dovm,1)
    exten => vmx,n(getdest),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/context)}" = "0"]?vmxpri)
    exten => vmx,n,Set(VMX_CONTEXT=${DB_RESULT})
    exten => vmx,n(vmxpri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/pri)}" = "0"]?vmxgoto)
    exten => vmx,n,Set(VMX_PRI=${DB_RESULT})
    exten => vmx,n(vmxgoto),Goto(${VMX_CONTEXT},${VMX_EXT},${VMX_PRI})
    exten => vmx,n(nofile),Noop(File for mode: ${MODE} does not exist, SYSTEMSTATUS: ${SYSTEMSTATUS}, going to normal voicemail)
    exten => vmx,n,Goto(s-${ARG2},1)
    exten => vmx,n(tmpgreet),Noop(Temporary Greeting Detected, going to normal voicemail)
    exten => vmx,n,Goto(s-${ARG2},1)
    exten => dovm,1,Noop(VMX Timeout - go to voicemail)
    exten => dovm,n,VoiceMail(${ARG1}@${VMCONTEXT},${VMX_OPTS}${VMGAIN})
    exten => dovm,n,Goto(exit-${VMSTATUS},1)
    exten => s-BUSY,1,Noop(BUSY voicemail)
    exten => s-BUSY,n,Macro(get-vmcontext,${ARG1})
    exten => s-BUSY,n,VoiceMail(${ARG1}@${VMCONTEXT},${VM_OPTS}b${VMGAIN})
    exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)
    exten => s-NOMESSAGE,1,Noop(NOMESSAGE (beeb only) voicemail)
    exten => s-NOMESSAGE,n,Macro(get-vmcontext,${ARG1})
    exten => s-NOMESSAGE,n,VoiceMail(${ARG1}@${VMCONTEXT},s${VM_OPTS}${VMGAIN})
    exten => s-NOMESSAGE,n,Goto(exit-${VMSTATUS},1)
    exten => s-DIRECTDIAL,1,Noop(DIRECTDIAL voicemail)
    exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
    exten => s-DIRECTDIAL,n,VoiceMail(${ARG1}@${VMCONTEXT},${VM_OPTS}${VM_DDTYPE}${VMGAIN})
    exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)
    exten => _s-.,1,Macro(get-vmcontext,${ARG1})
    exten => _s-.,n,VoiceMail(${ARG1}@${VMCONTEXT},${VM_OPTS}u${VMGAIN})
    exten => _s-.,n,Goto(exit-${VMSTATUS},1)
    exten => o,1,Background(one-moment-please)
    exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/ext)}" = "0"]?doopdef)
    exten => o,n,Set(VMX_OPDEST_EXT=${DB_RESULT})
    exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/context)}" = "1"]?opcontext)
    exten => o,n,Set(DB_RESULT=${VMX_CONTEXT})
    exten => o,n(opcontext),Set(VMX_OPDEST_CONTEXT=${DB_RESULT})
    exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/pri)}" = "1"]?oppri)
    exten => o,n,Set(DB_RESULT=${VMX_PRI})
    exten => o,n(oppri),Set(VMX_OPDEST_PRI=${DB_RESULT})
    exten => o,n,Goto(${VMX_OPDEST_CONTEXT},${VMX_OPDEST_EXT},${VMX_OPDEST_PRI})
    exten => o,n(doopdef),GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1)
    exten => o,n(nooper),GotoIf($["x${FROM_DID}"="x"]?nodid)
    exten => o,n,Dial([email protected],)
    exten => o,n,Macro(hangup,)
    exten => o,n(nodid),Dial([email protected],)
    exten => o,n,Macro(hangup,)
    exten => a,1,Macro(get-vmcontext,${ARG1})
    exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/ext)}" = "0"]?adef,1)
    exten => a,n,Set(VMX_ADEST_EXT=${DB_RESULT})
    exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/context)}" = "1"]?acontext)
    exten => a,n,Set(DB_RESULT=${VMX_CONTEXT})
    exten => a,n(acontext),Set(VMX_ADEST_CONTEXT=${DB_RESULT})
    exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/pri)}" = "1"]?apri)
    exten => a,n,Set(DB_RESULT=${VMX_PRI})
    exten => a,n(apri),Set(VMX_ADEST_PRI=${DB_RESULT})
    exten => a,n,Goto(${VMX_ADEST_CONTEXT},${VMX_ADEST_EXT},${VMX_ADEST_PRI})
    exten => adef,1,VoiceMailMain(${ARG1}@${VMCONTEXT})
    exten => adef,n,GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN,1)
    exten => adef,n,Hangup
    exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured)
    exten => exit-FAILED,n,GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN,1)
    exten => exit-FAILED,n,Hangup
    exten => exit-SUCCESS,1,GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN,1)
    exten => exit-SUCCESS,n,Playback(goodbye)
    exten => exit-SUCCESS,n,Hangup
    exten => exit-USEREXIT,1,GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN,1)
    exten => exit-USEREXIT,n,Playback(goodbye)
    exten => exit-USEREXIT,n,Hangup
    exten => exit-RETURN,1,Noop(Returning From Voicemail because macro)
    exten => t,1,Hangup
    
    ; end of [macro-vm]
    
    Was this page helpful?
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core