planetWayne.com - Forums
Rants and Raves and Generally Anything
Black List Management

 
Post new topic   Reply to topic    planetWayne.com - Forums Forum Index -> VoIP
View previous topic :: View next topic  
Author Message
planetWayne
Site Admin


Joined: 30 Jan 2003
Posts: 280

PostPosted: Sun Sep 19, 2004 12:43 am    Post subject: Black List Management Reply with quote

This gets you to a menu to manage your black list entries.

Its v1 at the moment as I've not added the ability to add a new number by dialing it on a phone. (oddly enough the Asterisk sounds do not have a recorded anouncement for adding a number - only deleteing one!)

A couple of things to note - you need to have LookupBlackList somewhere that handles your incoming calls - otherwise theres no point in having a black list.

Another sound file was generated from Rhetorical.com to tell the caller that they had been black listed.

Quote:
I'm sorry, The number you are calling from has been black listed - if you feel this is in error, please press one and leave a message after the tone.


This then gives the caller to air thier views on your new system Smile - I did have it whereby it recorded a message as default, but doing that means you also get a lot of blank messages where machines or number snooping services dont actually say anything. This way, there has to be somthing intelligent (!) on the end to actually press 1.

A global variable sets the extention you can dial to get to the management menu - in this example 540
Code:
[globals]
CallBlacklistExt=540            ;Lets you add the last caller id to the blacklist listing.


This bit sits on your menu or context that handles incoming calls - without this - the black list is pointless as theres nothing censoring off the call.
The prioritys may need to be changed to suit your needs.

'${FamilyMailBox})' in the example is the mail box number that is, in effect, an answering machine. Placing the 's' withing the Voicemail command means that it wont play the default 'Im sorry theres noone to take your call...' message - as we have already play the 'you are blacklisted' message.

The timeout extention will never be called normaly as the rest of the context would have your dial commands to dial your phones.

Code:
exten => s,1,Answer   ; Pickup the incoming call

; Check to see if the caller is on our blacklist - If yes then jump to 103
exten => s,2,LookupBlackList
.
.
.
exten => s,103,wait(1)
exten => s,104,background(blacklisted-prompt) ; (this number has been blacklisted....)

; the 's' means dont play a prompt as we already have told them its a black listed number
exten =>1,1,Voicemail(s${FamilyMailBox})
exten =>1,2,hangup

; if we time out - then say goodbye and hangup.
exten =>t,1,playback(goodbye)
exten =>t,2,hangup


This is the blacklist management context.
There is a bit of a tie in with the Last Number Caller Anouncements as this also makes use of the database entry lastcall/number1.
If you dont use that menu then you need to ensure that the database has recorded the last number that dialed in. Use a
dbput(lastcall/number1=${CALLERIDNUM}) to add the number id to the database

Code:
; This one lets you add last caller numbers to the black list and take a known number off the list.
[ManageBlackList] ; jumped to by the ${CallerBlackList} extention in the [nicepeople] context

exten => s,1,answer
exten => s,2,wait(.5)
exten => s,3,playback(to-blklist-last-num) ; to blacklist the last number press 1
exten => s,4,saydigits(1)
exten => s,5,wait(.5)
exten => s,6,playback(to-rmv-num-blklist) ; to remove a blacklisted number press 2
exten => s,7,saydigits(2)


; Add the last number called to the blacklist list.

exten => 1,1,dbget(tempnumber=lastcall/number1)
exten => 1,2,dbput(blacklist/${tempnumber}=1)
exten => 1,3,playback(num-was-successfully)
exten => 1,4,playback(added)
exten => 1,5,playback(goodbye)
exten => 1,6,hangup

; Remove a number from blacklist - dont forget to end with a #
exten => 2,1,Read(blacklistme,entr-num-rmv-blklist,0)
exten => 2,2,dbdel(blacklist/${blacklistme})
exten => 2,3,playback(num-was-successfully)
exten => 2,4,playback(removed)
exten => 2,5,playback(goodbye)
exten => 2,6,hangup

; If you press a wrong key then goto the menu again
exten => i,1,Goto(s,2)

; Timeouts - say goodbye and hang up.
exten => t,1,playback(goodbye)
exten => t,2,hangup


The last part needs to go in the context that has your extentions in that can call this management menu. This makes use of the global variable CallBlacklistExt as set in globals.

Code:
exten => ${CallBlacklistExt},1,goto(ManageBlackList,s,1)


Hopefully easy to follow Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    planetWayne.com - Forums Forum Index -> VoIP All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group