Was this page helpful?

DP: DND 勿擾模式修改版

    FreePBX 內建的 Do-Not-Disturb 勿擾模式,在某些時候,重要的電話仍必須能強制撥入,例如:

    1. Hotel style wake up call (download the hotel wake up module for freePBX)
    2. Emergency internal calling
       

    所以寫一個 dialplan,只要使撥入的電話經過它,就會自動解除 DND,運作流程如下:

    1. It unsets the DND value
    2. Makes the call
    3. Sets back the DND Value

    extensions_custom.conf

    [dnd-override]
    exten => _X.,1,NoOp(This context overrides DND)
    same => n,Set(IFDNDENABLED=${DB(DND/${EXTEN})})
    same => n,ExecIf($["${IFDNDENABLED}"="YES"]?Noop(Deleting: DND/${EXTEN} ${DB_DELETE(DND/${EXTEN})}))
    same => n,Goto(from-internal,${EXTEN},1)
    same => n,Hangup()
    ;
    exten => h,1,NoOp(Adding back DND status if that existed for user ${CONNECTEDLINE(num)})
    exten => h,n,ExecIf($["${IFDNDENABLED}"="YES"]?Set(DB(DND/${CONNECTEDLINE(num)})=YES))
    exten => h,n,Hangup
    

    此外,還能再寫一個 Macro 來呼叫這個 dialplan

    [macro-dnd-override]
    exten => s,1,NoOp(DND Override Call)
    exten => s,n,Authenticate(12345,a) ;; 12345 is the password here
    exten => s,n,Read(DNDOVERRIDECALLNUM,please-enter-your-extension-then-press-pound,,,4)
    exten => s,n,Goto(dnd-override,${DNDOVERRIDECALLNUM},1)
    exten => s,n,Hangup
    
    Was this page helpful?
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core