Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up a profile in tasker that sends a text message to everyone who calls me during a meeting. However, I don't want to waste my my credit by sending messages to fixed phones. How can I check if the call came from a mobile phone before sending the message?

Where I live, all mobile numbers start with 9 or 8, so I thought I might be able to use that. But I haven't be able to find a way to check what is the first digit in a number with tasker. Is there another way to do this? My objective is for tasker to know if the call came from a mobile or fixed phone.

share|improve this question
up vote 1 down vote accepted

Depending on the set up of your profile use the following:

In the Task step add the If statement: %CNUM ~ 9*/8* This means that the step will be executed only for number starting with 9 or 8.

Alternatively, set up the whole profile to only activate if the caller's number starts with 8 or 9. In Event (like Incoming Call) settings: Caller (normally says Optional) specify 9*/8* This means the profile will be only activated if the number starts with 9 or 8.

Hopefully, this will work for you.

For more info see:

share|improve this answer
Thanks. Pattern matching in tasker helps a lot. =) – Malabarba Jun 21 '11 at 14:04

Your Answer


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.