Hack48.Kindly Introduce Telemarketers to Mr. Privacy


Hack 48. Kindly Introduce Telemarketers to Mr. Privacy

If you enjoy being contacted by anxious telephone pitchmen promising a lower interest rate or offering a great deal on term life insurance while you're just sitting down to dinner, skip this hack.

Using techniques similar to those in "Selectively Forward Calls" [Hack #46], it's possible to discern between phone numbers that supply a caller ID and those that don't. This is different from merely identifying a certain caller ID number and then handling it. What we're doing here is shoveling all unidentified calls into a certain action.

If you like, you can even have your phone server handle these calls without interrupting you, putting a decisive end to those annoying dinner-hour calls from "Private" or "Unknown." Using a great little feature in Asterisk, the PrivacyManager command, we can fight fire with fire. This dial-plan command screens calls as described earlier, identifying the caller ID, or forcing the calling party to enter a caller ID if none is provided at the outset of the call. Best of all, everything can happen without your phone ever ringing, saving you from the aggravation of a sales pitch when you're trying to enjoy a filet mignon.

Consider the following from the [default] context, in extensions.conf:

 exten => s,1,PrivacyManager exten => s,2,Dial(Zap/2,30) exten => s,3,Hangup exten => s,102,Hangup 

The first priority of this extension contains the PrivacyManager command, which prompts the user to enter his 10-digit telephone number if no caller ID signals have been sent on the channel to identify the caller. If the caller doesn't enter his phone number, he gets dumped to priority 102 (100 plus the current priority), where the call is disconnected using the Hangup command.

When telemarketers call you, pretend you're Scarface, brandishing your Privacy Manager and saying, "Say hello to my little friend."


If the caller does successfully enter his 10-digit phone number, the dial plan proceeds to the next priority. In the previous example, a Dial command rings a phone connected to a Zaptel card (that's what's referenced by Zap/2) for 30 seconds before giving up and disconnecting the call if nobody answers.

4.9.1. Hacking the Hack

You can combine this hack and "Selectively Forward Calls" [Hack #46] to maintain privacy, and to pick and choose functionality based on caller IDfor instance, forwarding calls based on who's calling. And as shown here, you can make sure you know who's calling, with your new friend, Mr. Privacy:

 [incoming] exten => s,1,PrivacyManager exten => s,2,GotoIf($["${CALLERIDNUM}" = "3138853352"]?6:3) exten => s,3,GotoIf($["${CALLERIDNUM}" = "3132981848"]?6:4) exten => s,4,Playback(carried-away-by-monkeys) exten => s,5,Hangup exten => s,6,Dial(${MYCELLPHONE},30) exten => s,7,Playback(carried-away-by-monkeys) exten => s,8,Hangup exten => s,102,Playback(carried-away-by-monkeys) exten => s,103,Hangup 




VoIP Hacks
VoIP Hacks: Tips & Tools for Internet Telephony
ISBN: 0596101333
EAN: 2147483647
Year: 2005
Pages: 156

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net