Problems trying to obtain incoming call details
Posted: 23 Sep 2013 08:20
I thought this would be simple - but I'm tearing my hair out! I wanted to have a flow that triggered with an incoming call and announced the caller if in contacts or read the number out if not in contacts or said private number if no CID present.
I am triggering without a problem using the ringing call state, and I then init variables from call log for new call. The problem is that the details I pick up appear to be from the previous completed call rather than the current incoming call.
How do I obtain the current incoming details in automagic - which are displayed correctly on the screen by the phone??
Hits head I think for being so stupid .... it helps to use the correct variables!!
Solved I think, and hope, by a) forgetting call log and initialising variables and b) using caller_number and contact_name.
Still one niggle left though - how to make speech output give the phone number digit by digit rather than something like 25 million 300 thousand ....... - anyone got any tricks or methods for this??
I am using conditions
a) length(contact_name) > 0 to say if the caller is in contacts list, and
b) caller_number > 0 to see if number present.
Are these the correct tests to make or should I be doing something else?
Now I have been still getting stuck trying to break the number into digits. I got it to work in Tasker, but just cannot work out how to do it with automagic. It should be possible to create a list of digits by using the split function, but I just cannot get the format for the regular expression for the pattern to make a list of single character entries from the original calling number.
Please please - anyone got any ideas??
I am triggering without a problem using the ringing call state, and I then init variables from call log for new call. The problem is that the details I pick up appear to be from the previous completed call rather than the current incoming call.
How do I obtain the current incoming details in automagic - which are displayed correctly on the screen by the phone??
Hits head I think for being so stupid .... it helps to use the correct variables!!
Solved I think, and hope, by a) forgetting call log and initialising variables and b) using caller_number and contact_name.
Still one niggle left though - how to make speech output give the phone number digit by digit rather than something like 25 million 300 thousand ....... - anyone got any tricks or methods for this??
I am using conditions
a) length(contact_name) > 0 to say if the caller is in contacts list, and
b) caller_number > 0 to see if number present.
Are these the correct tests to make or should I be doing something else?
Now I have been still getting stuck trying to break the number into digits. I got it to work in Tasker, but just cannot work out how to do it with automagic. It should be possible to create a list of digits by using the split function, but I just cannot get the format for the regular expression for the pattern to make a list of single character entries from the original calling number.
Please please - anyone got any ideas??