Changes

no edit summary
Line 1: Line 1: −
<pre class="header-style">
+
<pre class="header-style">The Call Active trigger fires when a standard phone call is actively in progress. This allows you to automate actions during phone calls, such as enabling speakerphone, adjusting volume, or recording call start times.</pre>
This trigger is activated when a standard phone call is in progress.
  −
</pre>
     −
'''Magic Text'''<br/>
+
''' Options '''
When this trigger is used, you can access magic text via the [...] button where available.<br/>[https://macrodroidforum.com/wiki/index.php/Magic_text#Call_.28Active.2C_Ended.2C_Incoming.2C_Missed.2C_Outgoing.29 magic text]
     −
'''Configuration Options'''
+
* '''Select Contacts''' - Trigger for calls with specific contacts
 +
** Choose from your contacts list
 +
** Includes special options: Any Contact, Non Contact, Unknown Caller
 +
** Option to exclude selected contacts instead of including them
 +
* '''Select Groups''' - Trigger for calls with contacts from specific groups
 +
** Choose one or more contact groups (e.g., Favorites, Family, Work)
 +
* '''Specify Number''' - Trigger for a specific phone number
 +
** Enter a phone number or partial number match
 +
** Supports wildcards for partial matching
 +
** Option to exclude the specified number
 +
** Supports regex pattern matching
 +
** Magic text can be used for dynamic numbers
 +
* '''Any Number''' - Trigger for any call regardless of the number
   −
* Select Contact(s)
+
''' Special Contact Types '''
   −
'''''Any Contact'''''
+
When selecting contacts, the following special options are available:
- A call is active with any number that is in your contacts.
+
* '''Any Contact''' - Triggers for any number that is saved in your contacts
 +
* '''Non Contact''' - Triggers for numbers not saved in your contacts
 +
* '''Unknown Caller''' - Triggers for private/hidden numbers
   −
'''''Non Contact'''''
+
''' Magic Text '''
- A call is active with any number that is not your contacts.
     −
'''''Unknown Caller'''''
+
When this trigger fires, the following value are available via magic text for use in subsequent actions.
- A call is active with an unknown number (e.g. private number).
     −
* Select Group(s)
+
* {call_number}
 +
* {call_name}
 +
* {call_groups}
   −
You can select to trigger based on a contact group (e.g. Favourites/Friends etc.). The trigger will fire when a call is active with any contact from within the chosen group.
+
''' Examples '''
   −
* Select Number
+
''Example 1: Enable Speakerphone for Work Calls''
 +
  <pre class="trigger-style">Triggers
   −
You can specify a specific number to match against (or partial match). Please note that dialing USSD codes (e.g. **21.... ) on Android 14+ may need to be followed by a UI Interaction action to click the call button.
+
Call Active (Group: Work)</pre>
You may need a Wait action before the click operation to ensure the call screen has finished displaying.
+
  <pre class="action-style">Actions
   −
* Any Number
+
Speakerphone On</pre>
   −
When selecting this option the trigger will fire when any call is active (regardless of incoming number).
+
''Example 2: Log Unknown Caller Calls''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Call Active (Unknown Caller)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Write to File: Unknown call at [date_time]</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger fires when a call becomes active (answered), not when ringing
 +
* The trigger monitors both incoming and outgoing calls
 +
* Contact exclusion allows you to trigger for "all except" certain contacts
 +
* A background service monitors the phone state for this trigger to work
 +
* USSD codes on Android 14+ may require a UI interaction action to click the call button
 +
 
 +
''' Permissions Required '''
 +
 
 +
* '''Read Phone State''' - Required to monitor call state
 +
* '''Read Contacts''' - Required for contact-based filtering
 +
* '''Read Call Log''' - Required for call information access
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Call_Incoming|Call Incoming Trigger]]
 +
* [[Trigger:_Call_Ended|Call Ended Trigger]]
 +
* [[Trigger:_Call_Missed|Call Missed Trigger]]