其他開發技巧

    版本為 20:28, 20 Nov 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

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

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

    Queue(${QUEUE_NUMBER},t,,,,,ael_callanswered);
    
    當分機接通後,執行一個指定的 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 的段落裡,詳細請參閱 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()
    
    Powered by MindTouch Core