Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have Tasker for Android but I don't know enough about it to be able to implement this.

I'd like this to occur when I am connected to a specific wireless network:

If someone phones who isn't in my contact list, reject the call immediately (straight to voicemail).

If they call again within a certain amount of time (say, 30 seconds) allow the call to come through.

Frankly, I can't even get the first one working. I know it's possible. The time thing is a kind of added bonus

share|improve this question

migrated from superuser.com Jun 20 '12 at 14:48

This question came from our site for computer enthusiasts and power users.

    
First time I've ever heard of someone greylisting phone calls. Intriguing. –  lornix Jun 20 '12 at 15:34
1  
Related: android.stackexchange.com/questions/17529/… –  Flow Jun 20 '12 at 22:58

2 Answers 2

Have you tried browsing the Tasker's wiki? There are some good pre-made profiles there you can use.

The easy way to block calls with Tasker is described here:

Open Tasker, create a new Profile and name it "Blockr". Select the "State" context menu and the "Incoming Call" context from that menu. Keep this screen open and follow the instructions below to indicate which calls you would like to block on your phone.

Programming the Blocked Telephone Numbers

You have the option to enter a single number, multiple telephone numbers, any number that is not listed in your contacts, or any number that is not listed as a favorite in your contacts. Any combination of the above options can be included in the blocked call list. Multiple numbers are separated by the / symbol which indicates "or" in Tasker’s pattern match. You can also use the * symbol to indicate a match with any number of characters in the telephone number to create area code (or country code) call blocks. Here are examples of what you need to enter in the Caller field of the Incoming Call context dialog box in order to create each type of call block list:

To block a single caller with the number 123-456-7890 enter:

1234567890

To block two telephone numbers, enter the telephone numbers with a / symbol between them:

1234567890/1234567891

To block three telephone numbers, enter all three telephone numbers with the / between them:

1234567890/1234567890/1234567892

To block calls from individuals who are using a caller ID blocking feature enter the number zero:

0

To block calls from individuals who are not in your contact list, a pre-configured variable that matches all numbers in your contact list is used (C:ANY) with the exclamation point. The ! indicates "not" and is literally interpreted as all callers that are not the number that you enter. In this case, all numbers that are not part of your contact list:

!C:ANY

To block calls from both callers with caller ID blocked and those who are not listed as your contacts enter:

0/!C:ANY

To block a number of a specific caller and individuals with caller ID blocked enter the number, the / separator, and zero:

1234567890/0

To block calls from all numbers except for one caller, enter an exclamation point before the number of the caller that you want to allow.

!1234567890

To block calls from all callers except those who are in your favorite list, enter:

!C:FAV

To block all calls from an area code, use the * symbol to indicate that any number of characters can be matched following the first three digits (US area code) that you enter. In the following example, any telephone number from the 123 area code would be blocked:

123*

Block all calls from two area codes. Simply use the / symbol to combine the area code match in example 10. In the following example, all calls from numbers with area codes 123 or 321 will be blocked:

123*/321*

Attach the Call Blocking Action

Click Done on the "Incoming Call" context window. Select "New Task" from the top of the "Task" selection window that is displayed. Name the task "CallBlock". Click the (+) button at the bottom left hand of the screen to add a new action. Select the "Phone" action menu. Select the "Take Call" action from the Phone action menu. Click Done Click the (+) button at the bottom left hand of the screen to add a new action. Select the "Phone" action menu. Select the "End Call" action from the "Phone" action menu. Click Done. Click Done again on the "Task Edit" window. Make sure that the green check mark is displayed next to the "Blockr" profile on the "Profile" screen. Click Apply.

Tasker will close and "Blockr" will begin to actively watch your incoming calls for those numbers in your call block list. When an incoming call with one of the matched numbers is detected, the call is disconnected and your ringer is silenced. You set the actions up to briefly answer and immediately disconnect the call so it is not sent to your voicemail.

You can modify these instructions to add another condition which checks the WiFi network you are connected to.

share|improve this answer

You don't need Tasker. There is a dedicated App that does what you want: Harass Me

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.