其他開發技巧

    當 Queue 的 agent 接通後,執行一個指定的 AGI: CallAnswered.agi

    說明: 在 Queue 指令加入 Macro Name。

    Queue(${QUEUE_NUMBER},t,,,,,ael_callanswered);
    

    macro-ael_callanswered:

    context macro-ael_callanswered {
        s => {
              Wait(1);
              Noop(------ AGI: CallAnswered ------);
              AGI(agi://localhost/CallAnswered.agi);
        }
    }
    
    若 Dial 指令執行,當目的分機接通後,執行一個指定的 AGI: CallAnswered.agi

    說明:在 Dial 指令加上 M(Macro_Name)

    Dial(${RINGGROUP},${DIAL_TIMEOUT},M(ael_callanswered));
    

    macro-ael_callanswered:

    context macro-ael_callanswered {
        s => {
              Wait(1);
              Noop(------ AGI: CallAnswered ------);
              AGI(agi://localhost/CallAnswered.agi);
        }
    }
    
    如何取得Queue的通話數及其他參數

    Function - QUEUEVARIABLES()

    註:編輯 queues.conf,必須加在指定 queue name 的段落裡,詳細請參閱 http://www.voip-info.org/wiki/view/A...ig+queues.conf

    setqueuevar=yes

    // 取得 Queue 的各種參數

    ; Werte fuer die Queue "techsupport" abfragen:
    exten => 123,1,Set(err=${QUEUE_VARIABLES(techsupport)})
    exten => 123,n,Verbose(1,the strategy of the queue: ${QUEUESTRATEGY})
    exten => 123,n,Verbose(1,maxmimum number of calls allowed: ${QUEUEMAX})
    exten => 123,n,Verbose(1,number of calls currently in the queue: ${QUEUECALLS})
    exten => 123,n,Verbose(1,number of completed calls for the queue: ${QUEUECOMPLETED})
    exten => 123,n,Verbose(1,number of abandoned calls: ${QUEUEABANDONED})
    exten => 123,n,Verbose(1,current average hold time: ${QUEUEHOLDTIME})
    exten => 123,n,Verbose(1,queue service level: ${QUEUESRVLEVEL})
    exten => 123,n,Verbose(1,current service level performance: ${QUEUESRVLEVELPERF})
    exten => 123,n,Hangup()
    
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core