Incoming & outgoing call log help

202 views
Skip to first unread message

Phil Bilton

unread,
Apr 20, 2015, 1:14:11 PM4/20/15
to tas...@googlegroups.com
Hi I'm struggling with logging my calls for a project I'm creating and its got me dumbfounded.

I'm trying to log call number, name, date and time. I am putting these into arrays.

The problem is that the variables seem one step behind. When i make a call nothing gets logged in the variables.

However when i make a second call, the details from the first call get logged as the first variable in the arrays and the second call isn't stored anywhere.

I can't find anybody else with this problem in the group but I'm stuck.

Any help would be appreciated.

Phil Bilton

unread,
Apr 20, 2015, 1:24:43 PM4/20/15
to tas...@googlegroups.com
Just to add to the information,
When i receive a missed call, that profile is handled via Event missed call, and stores the results fine.

When i dial or receive a call, there is no Event action, therefore gets handled by a State context and does not store the results until i do another call, in which case, the first call is logged and not the most recent.

Robert Ryan

unread,
Apr 20, 2015, 2:05:52 PM4/20/15
to tas...@googlegroups.com
I assume that you are trying to add to your array in the enter task using a Call context. This would leave consistently you one call behind.

The solution, I think, is to add to the array in the **exit** task, ie after the Tasker variables are updated.

You might need a short wait to give the variables time to update.

HTH

Phil Bilton

unread,
Apr 20, 2015, 2:54:35 PM4/20/15
to tas...@googlegroups.com
Ok so should i just have a entry task not doing anything to enable me to have a exit task. And in that exit task have that with my arrays?

I will try that now, although my misses is getting sick to death with me constantly sending test messages and phone calls.....

Phil Bilton

unread,
Apr 20, 2015, 3:02:23 PM4/20/15
to tas...@googlegroups.com
Still one call behind with the arrays as the exit task. Not sure where to go with this now, will keep looking over the various forums i guess.

Robert Ryan

unread,
Apr 20, 2015, 3:05:27 PM4/20/15
to tas...@googlegroups.com


On April 20, 2015 12:54:35 PM MDT, Phil Bilton <pbil...@googlemail.com> wrote:
>Ok so should i just have a entry task not doing anything to enable me
>to have a exit task. And in that exit task have that with my arrays?

If you long-press your enter task, you should get a menu with a Move to Exit option. Press that and your enter task becomes an exit task.

Robert Ryan

unread,
Apr 20, 2015, 3:19:57 PM4/20/15
to tas...@googlegroups.com
Strange, I was sure that was going to work. I guess the variables don't update until after the exit task finishes.

You'll have to post your task descriptions.

Rich D

unread,
Apr 20, 2015, 3:22:14 PM4/20/15
to Tasker Google Groups Post


> Still one call behind with the arrays as the exit task. Not sure where to go with this now, will keep looking over the various forums i guess.

The run log should be able shed some light on on the issue.  Menu/ more / run log

Phil Bilton

unread,
Apr 20, 2015, 3:53:49 PM4/20/15
to tas...@googlegroups.com
Ok so incoming and missed calls work and i have outgoing setup exactly the same but with state outgoing but that is staying one call behind.

Profile: Outgoing (227)
State: Call [ Type:Outgoing Number:* ]
Exit: Outgoing call (217)
A1: Array Push [ Name:%Calllognumber Position:1 Value:%CONUM Fill Spaces:Off ]
A2: Array Push [ Name:%Calllogname Position:1 Value:%CONAME Fill Spaces:Off ]
A3: Array Push [ Name:%Calllogtime Position:1 Value:%COTIME %DATE Fill Spaces:Off ]
A4: Array Push [ Name:%Calllogindex Position:1 Value:/storage/emulated/0/Download/wear chat/bTy5ayeTL.png Fill Spaces:Off ]
A5: Variable Clear [ Name:%Calllogname12 Pattern Matching:Off ]
A6: Variable Clear [ Name:%Calllognumber12 Pattern Matching:Off ]
A7: Variable Clear [ Name:%Calllogtime12 Pattern Matching:Off ]
A8: Variable Clear [ Name:%Calllogindex12 Pattern Matching:Off ]


Robert Ryan

unread,
Apr 20, 2015, 4:02:39 PM4/20/15
to tas...@googlegroups.com
Did you try putting a 500ms Wait action before step A1? Sometimes there is a small delay before the values get updated.

Phil Bilton

unread,
Apr 20, 2015, 4:10:17 PM4/20/15
to tas...@googlegroups.com
You know what, your a genius and so is everyone else who helps in this group. Everytime i ask for help someone always chips in with solutions.

It appears to be working with a wait added.

Thanks as well rich, i was about to post the log as had to clear it first as was quite long.

Don't suppose you seen my other question on arrays rich, about setting a 100 variables to space bar?

Ping Flood

unread,
Apr 20, 2015, 7:36:07 PM4/20/15
to tas...@googlegroups.com
In addition to Ryan's suggestion, I think in you should also consider monitoring the %CONUM variable.
So the event will trigger only when the variable is set, ensuring you will have an updated value on it.

E.g.:

Profile: Outgoing (61)
Event: Variable Set [ Variable:%CONUM Value:* User Variables Only:Off ]
Enter: Anon (63)
A1: Flash [ Text:%CONUM Long:Off ]


I think is also important to recall how/when the Call variables are updated. Manual says:

  • 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.
So have in mind that values are from the last call, so it should be updated only after the current call ends.

Good luck in your project.. :)

Best regards
Reply all
Reply to author
Forward
0 new messages