Problem answering an automatic call

ariliberman

New member
I have a macro command to answer a call automatically, the problem is that even when I'm in the middle of a call, he answers the second incoming call, I set an answer constraint only when there is no active call and it doesn't work, does anyone have a solution?
 

Yogi

Member
I have a macro command to answer a call automatically, the problem is that even when I'm in the middle of a call, he answers the second incoming call, I set an answer constraint only when there is no active call and it doesn't work, does anyone have a solution?
Hi,
Just thought of a workaround - maybe there is a better solution.
Declare a public boolean variable e.g. call => false
Macro with 2 triggers

Code:
Call incoming

Call ended


if triggered call incoming

  if variable call is false set it to true

     answer call

  else

  // nothing

  endif

else if triggered call ended

  set variable call to false

endif

If the 2nd call comes in and ends after a period I don't
know if the trigger call ended acts for the unanswered call.
If it acts then the next call during the active call will be answered...

Hope it helps,
Regards
Fritz
 

Dm114

Well-known member
Hi,
Just thought of a workaround - maybe there is a better solution.
Declare a public boolean variable e.g. call => false
Macro with 2 triggers

Code:
Call incoming

Call ended


if triggered call incoming

  if variable call is false set it to true

     answer call

  else

  // nothing

  endif

else if triggered call ended

  set variable call to false

endif

If the 2nd call comes in and ends after a period I don't
know if the trigger call ended acts for the unanswered call.
If it acts then the next call during the active call will be answered...

Hope it helps,
Regards
Fritz
Interesting idea but a global variable (instead of local) won't solve the problem.

I have a macro command to answer a call automatically, the problem is that even when I'm in the middle of a call, he answers the second incoming call, I set an answer constraint only when there is no active call and it doesn't work, does anyone have a solution?
A constraint (either at the macro level or at Incoming Call trigger level) should do the job.
Could you show us your macro to check what's going wrong?
 

Yogi

Member
Interesting idea but a global variable (instead of local) won't solve the problem.


A constraint (either at the macro level or at Incoming Call trigger level) should do the job.
Could you show us your macro to check what's going wrong?
I have had a similar situation using Automate, maybe it's an Android behaviour with this call during active call.

I am not sure how MD works with the local variables in the case if another trigger from the same macro triggers,
so I supposed the public variable will do it in anyway.
Is the local variable bound to every trigger/call of a macro? If so it could be called as static also, because it doesn't change during the triggers...

I love the idea of constraints, it makes many situations simple 😊
 

Dm114

Well-known member
As macros are executed on a parallel mode, when a 2nd occurrence of a macro runs, it uses the variables values set in the 1st run (whatever they are global or local).
 
Top