Was this page helpful?

DP: ChanSpy 的客製

    SpyChan 用於第三者監聽兩方的通話,一般多用於 Call Center 系統。


    • Manager Channel
    • Agent Channel
    • Client Channel

    Listen: Monitor an agents call. The manager can hear both the agent and client channels, but no-one can hear the manager.

    Whisper:  Whisper to the agent. The manager can hear both the agent and client channels, and the agent can also hear the manager, but the client can only hear the agent, hence “whisper.”

    Barge: Barge in on both channels. The manager channel is joined onto the agent and client channels, and all parties can hear each other. Be warned, if the original agent leaves the call, the call is dropped. This is not a 3-way call.
    (However you can barge in, and when comfortable, initiate a 3way call to your extension so you can continue the call without the agent. This procedure varies from client to client (soft/hard phones))

    exten => _*222x.#,1,Macro(user-callerid,)
    exten => _*222x.#,n,Answer
    exten => _*222x.#,n,NoCDR
    exten => _*222x.#,n,Wait(1)
    exten => _*222x.#,n,ChanSpy(sip/${EXTEN:4},q)
    exten => _*222x.#,n,Hangup
    exten => _*223x.#,1,Macro(user-callerid,)
    exten => _*223x.#,n,Answer
    exten => _*223x.#,n,NoCDR
    exten => _*223x.#,n,Wait(1)
    exten => _*223x.#,n,ChanSpy(sip/${EXTEN:4},qw)
    exten => _*223x.#,n,Hangup
    exten => _*224x.#,1,Macro(user-callerid,)
    exten => _*224x.#,n,Answer
    exten => _*224x.#,n,NoCDR
    exten => _*224x.#,n,Wait(1)
    exten => _*224x.#,n,ChanSpy(SIP/${EXTEN:4},qB)
    exten => _*224x.#,n,Hangup



    設計一個 feature code 779 & 778 ,用於啟動/關閉分機的監聽功能。

    ;include => app-chanspy-custom
    ;exten => 779,1,Authenticate(1234)
    ;exten => 779,n,Read(SPYNUM,extension)
    ;exten => 779,n,ChanSpy(SIP/${SPYNUM},q)
    exten => 779,1,Authenticate(4567)
    exten => 779,n,Goto(chanspy-ext,s,1)
    ; end of [app-chanspy]
    ;include => app-chanspy-custom
    exten => 778,1,Authenticate(4544)
    exten => 778,n,Macro(user-callerid,)
    exten => 778,n,Answer
    exten => 778,n,Wait(1)
    exten => 778,n,ChanSpy()
    exten => 778,n,Hangup
    ; end of [app-chanspy]
    exten => s,1,Background(extension)
    exten => s,n,WaitExten(5)
    exten => i,1,Playback(invalid)
    exten => i,2,Goto(s,1)
    exten => t,1,Playback(invalid)
    exten => t,2,Goto(s,1)
    exten => 111,1,ChanSpy(SIP/${EXTEN})

    SPYGROUP 的運用


    7791 -> 分機開啟被監聽功能
    7792 -> 分機關閉被監聽功能

    exten => s,1,Set(GROUP=${DB(spygrp/${CALLERID(number)}))
    exten => s,n,GotoIf($[${ISNULL(${GROUP})}]?:continue)
    exten => s,n,NoOp(SPYGROUP is <${GROUP}> for ext.${CALLERID})
    exten => s,n,Set(SPYGROUP=${GROUP})
    exten => s,n(continue),NoOP(Ignore SPYGROUP...)
    exten => 7791,1,Answer
    exten => 7791,n,Wait(1)
    exten => 7791,n,Macro(user-callerid,)
    exten => 7791,n,Set(DB(spygrp/${AMPUSER})=spyon)
    exten => 7791,n,Playback(activated)
    exten => 7791,n,Hangup
    exten => 7792,1,Answer
    exten => 7792,n,Wait(1)
    exten => 7792,n,Macro(user-callerid,)
    exten => 7792,n,DBDel(spygrp/${AMPUSER})
    exten => 7792,n,Playback(de-activated)
    exten => 7792,n,Hangup


    用於所有 Inbound Call,若目的分機為 110-160 時,啟用監聽功能。
    注意 Set(__SPYGROUP=spygrp),兩個底線的用法。

    使用 override 方式修改 [macro-dial] 在 extensions.conf

    exten => s,1,NoOp("------------ Set SPYGROUP -------------")
    exten => s,n,Set(TOEXT=${ARG3})
    ;exten => s,n,Set(TOEXT="150")
    ; Spy activate to ext.110-160
    ;exten => s,n,GotoIf($[ $["x${LEN(${TOEXT})}"="x3"] & $["x${TOEXT:0:1}"="x1"] & $[${TOEXT:1:1}<=6] ]?spy:nospy)
    exten => s,n,GotoIf($[ $["x${LEN(${TOEXT})}"="x3"] & $[${TOEXT:0:3}<=201] & $[${TOEXT:0:3}>110] ]?spy:continue)
    exten => s,n(spy),Set(__SPYGROUP=spygrp)
    exten => s,n(continue),NoOp("--------- Nothing --------")
    exten => s,n,GotoIf($["${MOHCLASS}" = ""]?dial)
    exten => s,n,SetMusicOnHold(${MOHCLASS})
    exten => s,n(dial),AGI(dialparties.agi)
    exten => s,n,NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS})


    使用資料庫的方式來管理所有分機的 SPYGroup,非常實用,方便與其他系統作整合。

    Was this page helpful?
    標籤 (Edit tags)
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core