本帖最後由 bubblestar 於 2010-11-25 22:51 編輯
這個來電電話過慮黑名單,可以在電話鍵盤上加入拒接來電號碼,及刪除(即重新接受)在黑名單的電話號碼。
好處是不需要開著電腦在Console內進行,方便了好多。希望大家有用。- extensions.conf
- [internal]
- include => blacklist-add
- include => blacklist-rmv
- [blacklist-add]
- exten => *22,1,Answer
- exten => *22,n,Playback(enter-num-blacklist)
- exten => *22,n,Read(blacklist,then-press-pound,0,,2,10)
- exten => *22,n,SayDigits(${blacklist})
- exten => *22,n,Playback(if-correct-press&digits/2)
- exten => *22,n,Noop(Waiting for input)
- exten => *22,n,WaitExten(60,)
- exten => *22,n,Playback(sorry-youre-having-problems&goodbye)
- exten => 2,1,Set(DB(BLACKLIST/${blacklist})=1)
- exten => 2,n,Playback(num-was-successfully&added)
- exten => 2,n,Wait(1)
- exten => 2,n,Hangup
- [blacklist-rmv]
- exten => #22,1,Playback(entr-num-rmv-blklist)
- exten => #22,n,Read(blacklist,then-press-pound,0,,2,10)
- exten => #22,n,SayDigits(${blacklist})
- exten => #22,n,Playback(if-correct-press&digits/1)
- exten => #22,n,Noop(Waiting for input)
- exten => #22,n,WaitExten(60,)
- exten => #22,n,Playback(sorry-youre-having-problems&goodbye)
- exten => 1,1,DBdel(BLACKLIST/${blacklist})
- exten => 1,n,playback(removed)
- exten => 1,n,Hangup
- [from-pstn]
- exten => s,1,GotoIf(${DB_EXISTS(BLACKLIST/${CALLERID(num)})}?reject)
- exten => s,n,Answer()
- exten => s,n,Dial(SIP/2001,,r)
- exten => s,n,Hangup()
- exten => s,n(reject),Playback(ss-noservice)
複製代碼 |