Tasker to auto record incoming or outgoing call

most of time, i was thinking of tasker can do the job like callrecorder? if yes, how to do?
well, after done some homework, i have figured out the method below to share with you guys. via this method, tasker is able to auto record incoming 
call and outgoing call, unwanted callee and unreached call will be excluded from recording.

before everything, you should create 1 folder named with english characters, eg. Voice, then create 3 separate folders inside this folder, named it as "Incoming", "Outgoing" and "Temp".

NB.

if you are currently using some kind of caller location app, please make sure if it would change the call logs combined phone number and location info with symbol like angle brackets? if yes, tasker would fail to create the new file for outgoing call recording.

Profile 1: (incoming call)  
Context 1: Event- Phone- Offhook 
Context 2: State: Incoming Call

Task:

Action 1: variable-Variable Set [ Name:%Oncall To:0]  
Action 2: media-Record Audio [ File: Voice/Incoming/%CNAME_%CDATE_%CTIME  Source: incoming Call/Mic, Code: arm narrowband, format: raw_arm  ]  
Action 3: alert-Notify [Title:Recording Call Icon:(any icon)]

PS. you may put action 2 and 3 together as a separate task, then make it as a pop up alert positive button right after action 1, asking if you wanna 
record.

Profile 2: (outgoing Temp)

Context: State: outgoing Call

Task:

Action 1: task-If, %CONUM !~ XXXXX       # XXXX stands for the phone number which you don't wish to record
Action 2: variable-Variable Set [ Name:%Oncall To:1]  
Action 3: media-Record Audio [ File: Voice/Temp/    Source:ouggoing Call/Mic Code: arm narrowband, format: raw_arm  ]    
Action 4: alert-Notify [Title:Recording Call Icon:(any icon)]

PS. you may put action 2 and 3 together as a separate task, then make it as a pop up alert positive button right after action 1, asking if you wanna 
record.

Profile 3: (stop recording)

Context: Event-phone-Phone Idle

Task:

Action 1: media-Record Audio Stop
Action 2: alert-Notify Cancel, title: Recording Call
Action 3: task-If %Oncall ~ 1
Action 4: script-run shell, command:

sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "select duration from calls where type <= 2 order by date desc limit 1;"

use root checked, store result in %COUNT

# this step is very important, cause we may know, tasker even sl4a script could not detect if the callee has picked up the phone. if duration is 0, i guess you don't wish to waste storage to record the ringtone, right? this shell command would extract the value of duration for the last phone call 
you have made.

Action 5: File--Move [ From: Voice/Temp/.amr  To: Voice/Outgoing/%CONAME_%CODATE_%COTIME.amr  If,  %COUNT > 0 ]

# Based on action 4 run result, tasker may detect and exclude the unreached outgoing phone call. so it would not waste storage space at all.

cause the recording would just start right from the moment while dialing.

Action 6: task-end if

Action 7: variable-variable clear, name: %Oncall

##  duration counting  via sqlit 3 command

if we look into the calllogs within android default call database, we will see some significant columns, which are very useful for us to get this job done.

type: (numberic)

3: incoming missed call,  2: outgoing call(reached or unreached)  1: incoming call(offhook)

duration: (seconds)

order by date desc limit 1: this is to identify and select the last one in record.

Tasker to auto record incoming or outgoing call的更多相关文章

  1. Eclipse MAT: Understand Incoming and Outgoing References

    引用:http://xmlandmore.blogspot.hk/2014/01/eclipse-mat-understand-incoming-and.html?utm_source=tuicool ...

  2. Go Concurrency Patterns: Context At Google, we require that Go programmers pass a Context parameter as the first argument to every function on the call path between incoming and outgoing requests.

    小结: 1. Background is the root of any Context tree; it is never canceled: 2.     https://blog.golang. ...

  3. Tasker to proximity screen off

    If you are using proximity screen off pro or smart screen off, you may know how convenient it is to ...

  4. How to read out WhatsApp messages with Tasker and react on their content in real time

    http://technologyworkroom.blogspot.sg/2013/05/tasker-how-to-read-out-whatsapp.html Tasker can read o ...

  5. Video for Linux Two API Specification Revision 2.6.32【转】

    转自:https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html Video for ...

  6. curl 使用手册

    curl.1 the man page Related: Manual FAQ HTTP Scripting NAME curl - transfer a URL SYNOPSIS curl [opt ...

  7. 命令行工具--curl

    目录 命令:curl 一.简介 二.使用案例 1.基本用法 2.保存访问的网页 3.测试网页返回值 4.指定proxy服务器以及其端口 5.cookie 6.模仿浏览器 7.伪造referer(盗链) ...

  8. pppd - 点对点协议守护进程

    总览 SYNOPSIS pppd [ tty_name ] [ speed ] [ options ] 描述 点对点协议 (PPP) 提供一种在点对点串列线路上传输资料流 (datagrams)的方法 ...

  9. JDWP Agent

    JDWP Agent Implementation Description Revision History Disclaimer 1. About this Document 1.1 Purpose ...

随机推荐

  1. php修改文件上传大小限制

    上传一个20M文件的时候php报如下错误,是php上传文件大小限制引起 POST Content-Length of 19248654 bytes exceeds the limit of 83886 ...

  2. P1183 多边形的面积

    一道睡论数论题 其实是AC300祭才做的水题 题意: 很直白的的题意啊,就是求任意一个多边形的面积 所以我们来安利一下一个求多边形面积的数学通式: 给定多边形的顶点坐标(有序),让你来求这个多边形的面 ...

  3. 异步消息框架netty

    Netty-WebSocket长连接推送服务 http://blog.csdn.net/z69183787/article/details/52505249 http://blog.csdn.net/ ...

  4. 20165203 学习基础和C语言基础调查

    一.技能学习经验及体会 对于课外技能来说,我对很多领域都略知一二,但涉足不深,例如体育领域.摄影领域.绘画领域.书法领域等等,我所能拿得出手的就是体育领域的乒乓球了.娄老师的作业题目让我的思绪又回到了 ...

  5. python 比timedelta强大的多的 relativedelta

    datetime包中的timedelta功能有限,比如,一个月的delta都没法表示.dateutil包中的relativedelta要强大很多. 年月日周的delta都能支持,还有weekday, ...

  6. Chrome-Adobe Flash 无法正常使用

    https://support.google.com/chrome/answer/6258784 该网站因是是google.com,被强了,所以一般打不开. 故将google官方说明记录以下: 如果 ...

  7. android拾遗——AlarmManager的使用

    AlarmManager的作用文档中的解释是:在特定的时刻为我们广播一个指定的Intent.简单的说就是我们设定一个时间,然后在该时间到来时,AlarmManager为我们广播一个我们设定的Inten ...

  8. MFC+WinPcap编写一个嗅探器之三(WinPcap)

    介绍程序模块前,这一节再复习一下WinPcap WinPcap开发一个嗅探器的主要步骤如下: (1)获取嗅探设备 WinPcap提供了pcap_findalldevs_ex() 函数来实现这个功能: ...

  9. thinkphp _complex 复合查询 where多个子组实现

    SELECT * FROM `user` WHERE ( `mobile` = '13824653465' OR `nickname` = 'evan' OR `openid` = '14545-fd ...

  10. 001 Java 深拷贝、浅拷贝及Cloneable接口

    原本写过,后来在阅读的时候,感觉自己都不是太明白了,删除后参考人家的又重新写了一份. 一:开篇 1.复制一个变量 举例是int类型. 其他其中七种原始数据类型同样适用. 原始类型:boolean,ch ...