0

Where I'm living right now people can call you with reverse charges by adding 99 prefix to the call.

The problem if that the received call ID appears with 99 as prefix and suffix, and unless you know their number you have no way of knowing who's calling.

Example:

Let's say John's number is 5 123 4567 and he calls me with reverse charges. My phone caller ID will then display that 995123456799 is calling.

What I would like to do is to get the phone to both tell me it is a reverse charge call and who is the person calling.

Is there a way to do this other than creating an extra contact per person named "Reverse Contact"? (e.g. "Reverse John")

1
  • Heard something like this for the first time. Have you checked for any local app that does this thing for you? Nov 3, 2019 at 19:11

1 Answer 1

0

It's possible to accomplish it using automation apps. I have used Macrodroid.

  1. In the Triggers tab, in "Call/SMS" section, select "Call Incoming", then "Select Contact(s)". Choose "{Any Contact]", "[Any Number]", "[Non Coontact]" and "Unknown Caller". Click OK.

  2. In the Actions tab, in "Macrodroid Specific" section, click on "Set Variable", then "[New Variable]". Click OK. Enter the variable name, set its type to "String". Keep it local then click OK.

  3. In the Actions tab, in "Macrodroid Specific" section, click on "Text Manipulation". then "Extract Text" followed by OK. For the "Source text", click the 3-dot and select "Call number", then click OK. For "Text to match (regex)", enter ^99(.+)99$. Choose "Group 1", then for "Save variable to", select the variable create during step 1. Click OK.

  4. Save the macro and give it a name.

  5. Edit the macro. Click the "+" on the Actions tab. In "Conditions/Loop" section, select "If clause". Click the "+" next to conditions, then in "Macrodroid Specific" section, select "Macrodroid variable". Select the variable created in step 1, choose "Contains". Enter \w+ and enable "Enable regular expression matching". Click OK.

  6. In the Actions tab, in "Notification" section, click on "Display Dialog". Enter the dialog title. For the dialog text, press the 3-dot and select the variable created during step 1. Click OK.

  7. On the Actions tab, click the up and down arrows and move the Display Dialog created in step 6 between the "If" and "End If".

  8. Save the macro. It will look like the image below.

Explanation: When you receive a call, the number will be stored in the variable. it will then be checked if it starts and ends with 99 using the regular expression ^99(.+)99$. If yes, the number without the 99s ( the (.+) part of the regex) is extracted and displayed in a dialog box. If no, then no dialog is displayed.

See Regular Expression

IMG:

1
  • Thanks for answering, and sorry for not seeing it in so long. I had no internet access for a while and then I forgot about this. The answer you gave does well at extracting the number, but it doesn't tell me which of my contacts, if any, is calling. It only displays the number without the surrounding 99's. May 31, 2021 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .