Changes

no edit summary
Line 1: Line 1: −
===<p><b>About</b></p>===
+
<pre class="header-style">The Call Ended trigger fires when a standard phone call ends. This allows you to automate actions after phone calls complete, such as logging call times, restoring volume settings, or sending follow-up messages.</pre>
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
This trigger will be fired when a call is ended.
  −
</pre>
  −
* '''''When this trigger is present, you can use more [...]''''' '''''[https://macrodroidforum.com/wiki/index.php/Magic_text#Call_.28Active.2C_Ended.2C_Incoming.2C_Missed.2C_Outgoing.29 magic text]'''''
     −
==<p><b>Supported configurations</b></p>==
+
''' Options '''
   −
=== Select Contact(s) ===
+
* '''Select Contacts''' - Trigger when calls with specific contacts end
 +
** 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 when calls with contacts from specific groups end
 +
** Choose one or more contact groups (e.g., Favorites, Family, Work)
 +
* '''Specify Number''' - Trigger when a call with a specific phone number ends
 +
** 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 when any call ends regardless of the number
   −
'''''Any Contact'''''
+
''' Special Contact Types '''
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
Active call from any contact.
  −
</pre>
  −
'''''Non Contact'''''
  −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
Call of any No Contact.
  −
</pre>
  −
'''''Unknown Caller'''''
  −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
Call from an unknown contact.
  −
</pre>
     −
=== Select Group(s) ===
+
When selecting contacts, the following special options are available:
 +
* '''Any Contact''' - Triggers when calls from contacts end
 +
* '''Non Contact''' - Triggers when calls from non-contact numbers end
 +
* '''Unknown Caller''' - Triggers when calls from private/hidden numbers end
   −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
''' Magic Text '''
These are contacts that are in one or more groups e.g. (My contacts, Family, Coworkers, Do not disturb friends).
  −
</pre>
     −
=== Select Number ===
+
When this trigger fires, the following value are available via magic text for use in subsequent actions.
   −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
* {call_number}
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_name}
You may need a Wait action before the click
+
* {call_groups}
operation to ensure the call screen has finished displaying.
  −
</pre>
     −
=== Any Number ===
+
''' Examples '''
   −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
''Example 1: Restore Volume After Call''
Any number, no configuration required.
+
  <pre class="trigger-style">Triggers
</pre>
+
 
 +
Call Ended (Any Number)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Volume Change: Ring to 100%
 +
Volume Change: Media to 50%</pre>
 +
 
 +
''Example 2: Log Business Call Duration''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Call Ended (Group: Work)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Write to File: Work call ended at {hour}:{minute}:{second}</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger fires when any call ends, whether incoming or outgoing
 +
* The trigger monitors phone state changes to detect when calls end
 +
* Both the outgoing call number and incoming call number are tracked
 +
* Triggers for both answered calls that end and rejected/declined calls
 +
 
 +
''' Permissions Required '''
 +
 
 +
* '''Read Phone State''' - Required to monitor call state (always required)
 +
* '''Read Contacts''' - Required for contact-based filtering (when using contacts)
 +
* '''Read Call Log''' - Required for call information access (when using contacts)
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Call_Active|Call Active Trigger]]
 +
* [[Trigger:_Call_Incoming|Call Incoming Trigger]]
 +
* [[Trigger:_Call_Missed|Call Missed Trigger]]