Auto answer DTMF

Pr0z3r

New member
Hello everyone,

My building's intercom calls on my android cell phone.
When the phone rings, I need to pick up the call, press 5 and hang up the call.
I have to do this 80 times a day at the moment as we have a lot of visit.
I would like to automate this pattern with Macrodroid but did not succeed.

➜ Could you please help me creating this automation?

Best regards,

Pr0z3r
 

dhj49er

Well-known member
Hello everyone,

My building's intercom calls on my android cell phone.
When the phone rings, I need to pick up the call, press 5 and hang up the call.
I have to do this 80 times a day at the moment as we have a lot of visit.
I would like to automate this pattern with Macrodroid but did not succeed.

➜ Could you please help me creating this automation?

Best regards,

Pr0z3r
Have you started to develop a macro?

It would help if you could provide a screenshot of the macro, what it did successfully and where it failed.

With that we should be able to help you.
 

Pr0z3r

New member
Thank you for your quick response.

For your information, my phone is in French.
However, in detail, the automation works as follows:
- The trigger is a call to a specific number (the front door number)
then :
1. Pick up the call
2. Display the numeric keypad
3. Press 5
4. Hang up call

All UI interactions are performed with a single click, then with x,y locations.

I took the precaution of waiting 2s between each action.

Today the call won't hang up, and I can't see if the other automations can work.

I'd like the calls to be triggered when the phone is locked.
 

Attachments

  • Resized_Screenshot_20230918-122052_MacroDroid.jpeg
    Resized_Screenshot_20230918-122052_MacroDroid.jpeg
    110.3 KB · Views: 21

dhj49er

Well-known member
In order for the macro to do what you want, the first action needs to answer the call and for the phone to show the numeric keypad, irrespective of the screen being on or off when the call is received.

Does the 1 UI Click action do all of that?

On my phone I have to swipe a button to accept a call.

The subsequent UI Click actions opens the keypad, presses 5 and ends the call. Since you are using x,y position these need to be in the same place irrespective of the screen being on or off when the call is received.

Its worth checking the phone operation by manually going through the steps to do what you want - then check that the macro does the exact same steps.
 

Pr0z3r

New member
Following your comment, I've reworked the automation a little to include the gesture for picking up the call. I've also put my application in English to facilitate our exchange.

At moment t, the automation is not triggered (at least I don't have an apparent sign).
 

Attachments

  • Resized_Screenshot_20230918-164209_MacroDroid.jpeg
    Resized_Screenshot_20230918-164209_MacroDroid.jpeg
    100.8 KB · Views: 18

Pr0z3r

New member
I'm wondering if these are the right contact details.
What means do you use to identify the right contact details?
 

Endercraft

Moderator (& bug finder :D)
Make sure to check system log to see if macro triggered and troubleshooting section.

On some devices calls are not received by MacroDroid is device is locked or MacroDroid isn't in foreground. I think there was a fix but I'm not sure what it was.
 

Dm114

Well-known member
Following your comment, I've reworked the automation a little to include the gesture for picking up the call. I've also put my application in English to facilitate our exchange.

At moment t, the automation is not triggered (at least I don't have an apparent sign).
Assuming your gesture automation is correct, you should begin your macro with a wait action because the trigger could fire before the screen is ready to accept gesture.
 

Pr0z3r

New member
1. How to check the system log on android ? (What kind of app should I download?)
2. I added a wait time but it had no effect.
3. For additional information, I have checked the “foreground view” option.
 

Qarboz

Well-known member
1. How to check the system log on android ? (What kind of app should I download?)
2. I added a wait time but it had no effect.
3. For additional information, I have checked the “foreground view” option.
1
You need to check the system log of MacroDroid (not Android). You can find it on the MacroDroid home screen, green tile
 

Endercraft

Moderator (& bug finder :D)
You could say Logcat is Android's system log but as @Qarboz said you need to check the MacroDroid system log.
Logcat may be useful if you can't make the call trigger work.
 

Pr0z3r

New member
I just saw the logs, and there was 1 trigger, but all the other tests do not appear. This means that it does not trigger.

What do you think I can do to resolve the situation?

Do we agree that this automation isn't supposed to be this complicated?
 

dhj49er

Well-known member
I just saw the logs, and there was 1 trigger, but all the other tests do not appear. This means that it does not trigger.

What do you think I can do to resolve the situation?

Do we agree that this automation isn't supposed to be this complicated?
I agree automation can be complicated, but not MD.
Fully understanding what the phone does when you want to automate something can be complicated. Android is not a straight forward operating system.
I assume by " 1 trigger, but all other tests do not appear" you mean the following
The Trigger is the call answering Tigger from your macro.
The other tests are all the actions in your macro.
If this is the case, I have never had a trigger fire and no actions from its macro run.

I suggest you turn on system log constraints and provide a copy of the log showing the trigger.
 

Endercraft

Moderator (& bug finder :D)
I have never had a trigger fire and no actions from its macro run.
I had an issue with notifications triggering actions blocks like that but doesn't come close to this problem.

Actually it is possible in rare cases where the macro has invalid values.
 

ILIMB

New member
Hi @Pr0z3r, have you succeeded? I actually stumbled upon your post by looking for a solution to a similar problem (other than having to type a pin followed by # instead of a single digit) and it was pretty straightforward setting it up on my Galaxy S22. And I didn't even know about the existence of MD before.

Based on what I could read above, I see the two following issues:
- if you are obliged to embark on gestures for answering calls, you should at least anticipate the gesture with a 2-3 secs wait, the phonecall screen doesn't appear instantly
- I didn't have to go through the pain of gestures for answering, I just trusted MD's "answer phonecall" preset action

Then it's pretty easy: just use coordinates for the digits to be pressed (on my phone preceded by a tap of the numeric keypad button, before aiming for numbers), separated by 500ms waits just for caution, and one last press for the call drop button. Taking a screenshot of the keyboard screens and enabling developer options for overlaying "mouse" coordinates helps big time.

Actually I didn't try if typing the digits without coordinates would work, instead of going through the hassle of finding all their coordinates, because anyway the action of accessing the numeric keypad itself requires coordinates... unless there is a "keyboard" shortcut for it as well.
 
Last edited:

ILIMB

New member
Here is my macro, just in case. Sure it's over engineered in some bits, but you can simply extrapolate what you need from here.
 

Attachments

  • Screenshot_20231119_145328_MacroDroid~2.jpg
    Screenshot_20231119_145328_MacroDroid~2.jpg
    321.3 KB · Views: 15

ILIMB

New member
Speaking about overengineering, it now mutes the microphone, as I got caught by a real gate opening while brushing teeth... and turns on the speakerphone, as I was left with the doubt that the gate did open (it says "gate is open" on the line, only I couldn't hear it).
Blocked autorotation, to preserve coordinates, and stores the silent status and acts upon it to restore it at the end.
Ah and it doesn't pick the call up in case I'm on another call already.

Screenshot_20231119_225703_MacroDroid~2.jpg
 

ILIMB

New member
My conclusion: macrodroid sucks
I invite you to take a look at Twilio
Actually, it doesn't. Hadn't it been for your post, I wouldn't have discovered that MD actually solved my issue.

Took a look at Twilio, totally different cloud based paradigm and even pay as you go model, then I should configure the dialer to call their number rather than mine, etc. seems too much for something that I literally just fixed and with a use case that was even slightly more complex than yours.

"Don't fix it if it ain't broken" is what comes to my mind now...
 
Last edited:
Top