I found out how to make it start recording when call is established, but i need help to check when it actually started because i need to loop action until it does.
Root is needed for this:
1 - On my phone, i go to advanced settings and activate cursor location.
2 - Make a call, press the record button and write down the dX and dY values. End the call. Turn OFF the cursor location.
3 - Tasker, create Profile "name_of_profile" with State / Outgoing Call + Event / Phone Off Hook.
4 - Add tasks to that profile: [Task Wait 1 second], [Script / Run Shell], on Command type "input tap dX dY" (dX and dY are the values you wrote down).
5 - Check "Use Root" option
6 - This is the part i don't know, Tasker needs to check if phone is recording audio, if it's recording, task will end, if it's not, it will go to action [Wait 1 second] to press again because the record button will only be clickable when call is established.
If there any variable to check if phone is recording audio ?
Or any other suggestions ?