Phone Offhook Event Configuration

305 views
Skip to first unread message

Justin Davies

unread,
Mar 14, 2015, 11:26:49 AM3/14/15
to tas...@googlegroups.com
I am a newbie to Tasker and any assistance would be appreciated.  I am trying to help my grandma by making a phone call in the middle of the night to remind her to take her medicine.

My end goal is to have a phone call made automatically at a specific time, wait for so many seconds after the call starts to ring, and then hang up.  I currently have something in place that somewhat works but the result varies.  I have a profile for a specific time and an event that makes a call, waits so many seconds, and ends the call.  The problem is that sometimes the call is made immediately and other times there is a delay, ultimately making the call either ring my grandma's phone just a few times or it rings for a very long time and then goes to voicemail.

I have noticed that the timer on my phone does't start until a phone call actually starts to ring.  After doing some homework, it looks like this might be related to the offhook state.  I have created a profile for the offhook state and added an event to set a variable of %INCALL to 1.  I have another profile with an event to clear the %INCALL variable.  I then tried to modify my existing call event with a wait until %INCALL is set action.  This didn't seem to work, and oddly enough, the wait until action still needed some type of time associated with it.

I'm not sure if I'm on the right track but I'm trying hear.  I'd like to get this to work to ring about the same amount of times with every attempt.  Any help is appreciated! 

Rich D

unread,
Mar 14, 2015, 6:57:35 PM3/14/15
to Tasker Google Groups Post



Sounds like you are almost there. To see what is actually happening you can turn on and check the run log.

It might be  priority issue. you could try increasing the launch task priority setting of the 'off hook' profile to 7

Could you post all relevant profiles and task descriptions?


To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).

Message has been deleted
Message has been deleted

Justin Davies

unread,
Mar 14, 2015, 8:30:43 PM3/14/15
to tas...@googlegroups.com
Thank you for your reply.  Here is what I have so far:

Profile: 1:00 AM (2)
Time: 01:00
Enter: Call Grandma (3)
A1: Call [ Number:1234567890 Auto Dial:On ]
A2: Wait Until [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] If [ %INCALL Set ]
A3: End Call

Profile: Offhook (12)
Priority: 7
Event: Phone Offhook
Enter: Phone Offhook (13)
A1: Variable Set [ Name:%INCALL To:1 Do Maths:Off Append:Off ]


Profile: Idle (14)
Event: Phone Idle
Enter: Phone Idle (15)
A1: Variable Clear [ Name:%INCALL Pattern Matching:Off ]


Any ideas of what I might be doing wrong? Thanks again!

Rich D

unread,
Mar 14, 2015, 8:54:31 PM3/14/15
to Tasker Google Groups Post


Have you tried it with the priority of 7 ?

Have you confirmed that the phone off hook context only fires once the called phone starts ringing?  If so how?

Can you post the run log when it fails and how it has failed?

Rich D

unread,
Mar 14, 2015, 8:59:13 PM3/14/15
to Tasker Google Groups Post


Forgot to mention. If the phone off hook profile does fire once the phone starts ringing then I do not see why your posted profiles would not work.

So I would start by confirming that.. 

Justin Davies

unread,
Mar 15, 2015, 1:39:40 PM3/15/15
to tas...@googlegroups.com
After looking at the log, it appears that everything is firing correctly and the Offhook state isn't related to the call timer after all. I say this because I still have phone calls taking place for various lengths, yet the timers for the actions are taking place when they should. I suspect it's because the phone goes offhook when the call is made, but the timer doesn't start until the call actually starts to ring.

Having that said, is there another variable that can be used? If not, I have a different thought. The phone plays a sound in the speaker when the timer actually starts. Is there a way for me to identify what the sound is and link a wait action to the opening of the file? Just a thought.

Thano you for your help!

Rich D

unread,
Mar 15, 2015, 2:09:17 PM3/15/15
to Tasker Google Groups Post


> Having that said, is there another variable that can be used?

Not that i know of,  I have seen other posts looking for a way to detect when a called phone starts ringing. You could try a search of this group.

  If not, I have a different thought.  The phone plays a sound in the speaker when the timer actually starts.

And the timer does not start until the other phone is ringing?

What is a 'call timer' ?  I assume it is a app.  Or is it a device feature?

Either way it may be detectable from a app context. If you check the 'All' option and the 'services' option in the app context you might be able to find it. !

Does it or can it (the call timer) put up a notification?

  Is there a way for me to identify what the sound is and link a wait action to the opening of the file?  Just a thought.

Possibly.   You may need root to monitor the file.  You might find it by checking your log, or there is also a way to list all files accessed within the last x seconds. You need a terminal emulator and the correct 'find' command.  I do not know it off hand but you should be able to get it with some google searches.

Justin Davies

unread,
Mar 15, 2015, 4:49:38 PM3/15/15
to tas...@googlegroups.com
The call timer that I am referring to is the standard timer within the Phone application that shows the length of a phone call. I have a Sprint Samsung Galaxy S5 and the timer doesn't start until the carrier starts to process the call, meaning that ringing is happening (not necessarily on the other end). I know that sometimes I place a call and the phone hangs for a minute. I then hear a chime on my ear, the timer starts, and I hear ringing.

If you have any other thoughts, please let me know. I'll continue to dig on my side and will report back. Thanks again!

Rich D

unread,
Mar 15, 2015, 10:53:26 PM3/15/15
to Tasker Google Groups Post


I place a call and the phone hangs for a minute.  I then hear a chime on my ear, the timer starts, and I hear ringing.

So there is no flash or screen change at all when you hear the tone?

Are you rooted?

Also, are you looking for something to make into a app for other devices? Because on my device I appear to have a call timer  however I do not get a tone at the beginning just a flash at the end telling me my call time.

Justin Davies

unread,
Mar 16, 2015, 2:04:40 AM3/16/15
to tas...@googlegroups.com
Correct.  There isn't a flash or screen change when I hear the tone.  The only thing that changes is the timer actually starts to count.

Yes, I'm rooted.

I'm just looking to get this working for now.  I'm hoping that this will help others in the future as well.

In regard to the call connected tone, I wonder if you have it as well.  I don't believe that it came enabled by default and I had to enable the setting.  On my S5, I found it by launching the Phone app, Menu, Settings, Call, Call Alerts, and enabled Call Connect Tone.  There is also a "Vibrate on Connection to Network" setting that might give me some hope as well.  I believe that both of the settings are triggered when the call starts ringing.

Please let me know your thoughts.  Thank you!

Marta Hintz

unread,
Mar 16, 2015, 2:55:59 PM3/16/15
to tas...@googlegroups.com
there is a plugin that will find all sorts of services and systems.  It is called System Services for Tasker.  Check out the info on it at the playstore.  You may find that it would find the system/service for the call alerts that samsung turns on.   
Reply all
Reply to author
Forward
0 new messages