chenxiaolong / BCR

A Basic Call Recorder for rooted Android devices
GNU General Public License v3.0
1.67k stars 109 forks source link

Add limited support for call redirection #444

Closed chenxiaolong closed 11 months ago

chenxiaolong commented 11 months ago

Android 10 added the CallRedirectionService API, which allows a third party app to process outgoing calls made from the system's dialer. Some call redirection services, like Google Voice, use phone calls under the hood instead of VOIP. These calls can be recorded by BCR, but would previously show the service's proxy phone number.

Unfortunately, with the way Android's APIs are designed, the only thing that's aware of the original phone number is the dialer. We have no way of querying that in BCR until the call ends and the dialer writes the entry to the call log. This commit implements support for looking up the phone number from the call log.

This lookup functionality only works for non-conference calls and the call will always be classified as All other calls in the auto-record rules.

Fixes: #443