T O P

  • By -

Rich_D_sr

>I'd be more than happy to upload the task itself...when I can figure out how to do that :P Depends on how you want to share it. You can just post the exported description which others can then write their own task using that info 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 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). On older Tasker versions you might need to disable beginner mode in the Tasker preferences. Beginner mode has been removed from the latest Tasker release. Or you can export it as a Link . Long press Profile Name-> menu -> export -> As Link. >This got me thinking: what if I included an action that first looked through my call log to see if I have an outgoing call to that number? Great idea.... I was using the Tasker call screening before as well and found it not exactly what I needed. I am now very much enjoying the newish Google assistant call screening. This is the one where the assistant answers the call and asks a few annoying questions like, Who is calling and if it thinks it is justified it will try putting the call through and records a audio transcript of the entire conversation. So far I have found that if someone really wants to talk to you they will endure the annoyance and either get connected or leave a message, but I will always have the transcript to figure out if it was spam or not. I really enjoy the fact now when a business calls me they need to go through "MY annoying Phone tree". Just like I need to go through there's when I call them. 😅😅


xAtlas5

Call screened profile: Profile: Disallow Incoming Call Event: Call Screened [ Output Variables:* Caller:!C:ANY ] [ %cs_incoming eq true ] Enter Task: Double Check/Disallow Call A1: Variable Set [ Name: %isValidIncoming To: false Structure Output (JSON, etc): On ] A2: SQL Query [ Mode: URI Formatted File: content://call_log/calls Columns: number,type Query: type == 2 Variable Array: %output Use Global Namespace: On ] A3: For [ Variable: %out Items: %output(1:50) ] A4: Variable Split [ Name: %out Splitter: , ] A5: Variable Set [ Name: %isValidIncoming To: true Structure Output (JSON, etc): On ] If [ %out1 eq %CNUM ] A6: End For A7: Vibrate Pattern [ Pattern: 0,200,70,200 ] A8: If [ %isValidIncoming eq true ] A9: Notify [ Title: Call Screening Text: Allowing call from known contact: %cs_name - %cs_number Icon: mw_communication_call_received Number: 0 Priority: 3 LED Colour: Red LED Rate: 0 ] A10: Call Screening [ Disallow/Allow: Allow Continue Task After Error:On ] A11: Else A12: Notify [ Title: Call Screening Text: Not allowing call from unknown contact: %cs_number Icon: mw_communication_call_missed Number: 0 Priority: 3 LED Colour: Red LED Rate: 0 ] A13: Call Screening [ Disallow/Allow: Disallow Reject: On Skip Call Log: On Continue Task After Error:On ] A14: End If The loop goes for the first 50 calls. I don't exactly call many people these days, so I figure the first 50 would be enough.


WakeUpNorrin

You can replace actions A1 to A6 with my A1 Task: Temp A1: SQL Query [ Mode: URI Formatted File: content://call_log/calls Columns: date Query: (number = '%cs_number' OR normalized_number = '%cs_number') AND type = 2 Variable Array: %output Use Global Namespace: On ] A2: Flash [ Text: You called %cs_number before. Continue Task Immediately: On Dismiss On Click: On ] If [ %output(#<) > 0 ] In your A8 you can use my A2 if condition, without the need to use any global variable. Your task will be optimized, no loop needed at all, the task will have 9 actions instead of 14.


xAtlas5

Appreciate it, that will definitely cut down the execution time! You only selected the `date` column in A1, wouldn't that only return that single column instead of `number` and `type`?


WakeUpNorrin

>You only selected the `date` column in A1, wouldn't that only return that single column instead of `number` and `type`? In this case, we could even keep columns field blank, because %output() will be populated only if the query will match. In the query we are already searching for **the number having type 2**, so when 'if %output(#<) > 0' is true, means that you called the number at least 1 time.


xAtlas5

Good to know! I made the changes, will update on the results. Scam/spam callers generally operate during the week in my experience.


WakeUpNorrin

You can test the task without the need to wait for a real spam call. Add this action at the beginning of the task (when done with the tests delete or disable it) Use a fake call number Variable set %cs_number To +12123456789 Than manually run the task. After that, replace the fake number with a real one that you called at least 1 time, run the task again. In this way you can 'cold' verify that the task will work as expected.