返回列表 發帖
現在有新進展
  1. [default]                                       

  2. exten => s,1,Answer(500)                         ; Answer will wait 0.5 seconds to pass back to dialplan

  3. same => n,Goto(auto-attendant,s,1)



  4. [auto-attendant]

  5. exten => s,1,GotoIf($[${CALLERID(num)} = Anonymous]?Block)
  6. same => n,GotoIf($[${CALLERID(num)} = Block]?Block)
  7. same => n,GotoIf($[${CALLERID(num)} = OutOfArea]?Block)  
  8. same => n,GotoIf($[${CALLERID(num)} = Unavailable]?Block)

  9. same => n,GotoIf($[${CALLERID(num)} = 91234567]?CD)

  10. same => n,GotoIf($[${CALLERID(num)} = 98765432]?GH)

  11. same => n,Authenticate(1234)

  12. same => n,Goto(mainmenu,s,1)

  13. same => n(CD), Dial(SIP/2001,20,t)

  14. same => n(GH), Dial(SIP/2002,20,t)

  15. same => n(Block), Background(vm-goodbye)
  16. same => n,Hangup()
複製代碼

TOP

上面的 scripts
1. 先block 冇 callerID
2. 然後容許 trusted user 使用
3. 最後,唔知的 callerID,可以經 passkey 打入

TOP

不過,還有一個問題,要知道電訊公司點樣設定 callerID

TOP

放在你incoming pstn or cmphone context
你要修改少少

TOP

回復 9# orangelau

Why? Please post up some examples and general section of sip.conf
The scripts I showed can allow some screening based on callerID.

It works in CMPhone

TOP

mainmenu係邊度整?
orangelau 發表於 2014-12-13 14:55


你要做點修改

TOP

可以,我的 scripts 已做了

TOP

如密碼?
orangelau 發表於 2014-12-17 23:37


更改這行的 91234567 到你所打入的 callerID
    same => n,GotoIf($[${CALLERID(num)} = 91234567]?CD)
更改 2001 到你所需的 internal sip extension
same => n(CD), Dial(SIP/2001,20,t)

例子的密碼為 1234,建議改為6個或以上數字
same => n,Authenticate(1234)

最後,因應你的需要,增加你想對應的callerID 和 sip extension

現在的 script 例子,使用了 same => n,方便加減修改。

提提你,需要執行 dialplan reload,才會實現你的script。

TOP

返回列表