> I want tasker to execute in following steps- For outgoing call when I press dial/calling button stop executing call , trigger assigned task , when task finishes execute call.
> For this to happen tasker has to capture dial intent and block it from executing until task finishes. I am not sure how tasker will block call until task finishes. Because as I dial tasker starts executing task while call execution goes in parallel , result I am not able to get desired output from task execution.
I have no idea on how to make the intent capture work, however if you are rooted you could use %WIN to figure out you are ready to dial and put up a transparent blocking scene over the dial button then destroy scene and do a emulated screen tap to dial.....
I do not child to much hope for this approach either however have you tried
1. ending the call
2. Complete task
3. Use %CONUM to radial the call
From the user guide..
Call Name / Number/ Date / Time / Duration (Out)(dynamic, monitored) %CONAME / %CONUM / %CODATE / %COTIME / %CODUR The called name,number,date and time of the last (not the current) outgoing call made. Called Name is set to the called number if the contact couldn't be looked up. It's unavailable on Android versions prior to 2.0.
There is a variable %TRUN (tasks running) you can use to verify that your task has completed..
This one had me curious, So I did some testing and it actually works... 'sort of works'
The only issue I had was %CONUM takes a little bit to be updated. If I set the wait action in the task " I take too damn long" " for anything less than 2 seconds, %CONUM will not be updated quick enough and it will call the previous number to that.. this may be different on your device..
Profile: Stop Call (513)
State: Call [ Type:Outgoing Number:* ]
Enter: Kill Call (514)
A1: If [ %Callend = 1 ]
A2: Variable Clear [ Name:%Callend Pattern Matching:Off ]
A3: Stop [ With Error:Off Task: ]
A4: End If
A5: End Call
A6: Perform Task [ Name:I Take To Damm Long Stop:Off Priority:9 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A7: Call [ Number:%CONUM Auto Dial:On ]
A8: Variable Set [ Name:%Callend To:1 Do Maths:Off Append:Off ]
I Take To Damm Long (515)
A1: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]