Action Scripts
Action Scripts define the behavior that occurs when calls reach routes, extensions, and feature codes. Each action script contains dialplan commands that control how calls are processed.
Action scripts are used in Bulk Generator, User Extensions, Feature Codes, Voice Menus, Inbound Routes, Outbound Routes, and Hunt Groups.
The system ships with many built-in action scripts for common scenarios. You can clone and modify them or create your own.
Built-in action scripts are protected and cannot be modified or deleted. Clone one to create an editable copy. Use the Save Settings button on the Advanced tab to change where a built-in script is available.
Grid Features
Used column shows how many routes, extensions, and feature codes reference each action script. Hover over the count for a summary. Scripts with no Available In flags show a Hidden badge here, meaning they will not appear in any assignment dropdown.
Available In column shows colored badges for each area where the action script can be assigned (Inbound, User, Feature, Outbound, Other).
Available In filter allows you to show only action scripts intended for Inbound Routes, User Extensions, Feature Codes, etc.
Hiding Action Scripts
To hide an action script from all assignment dropdowns, open it and uncheck all Available In options on the Advanced tab. The script will show a Hidden badge in the Used column. Already-assigned scripts continue to function normally.
For built-in scripts, use the Save Settings button on the Advanced tab to save visibility changes.
Create/Edit Action Script
General Tab
Name. A short, descriptive name shown in dropdowns when assigning this action script.
Category. Group this action script belongs to, used for organizing the list.
Description. Longer explanation of what this action script does.
Internal Name. Unique alphanumeric identifier (no spaces). For new action scripts only. We recommend using a common prefix. Built-in action scripts use the “tl-” prefix, which should not be used for custom scripts.
Advanced Tab
Available In. Select which areas can use this action script: Inbound Routes, User Extensions, Feature Codes, Outbound Routes, or Other (internal use by other scripts). Unchecking all options hides the script from all dropdowns.
Dialplan Code. The Asterisk dialplan commands that execute when this action script runs. Standard macro rules apply, so arguments are referenced as ${ARG1}, ${ARG2}, etc.
Example:
exten => s,1,ExecIf($["${ARG6}" != ""]?Set(CHANNEL(musicclass)=${ARG6}))exten => s,n,GotoIf($["${MACRO_EXTEN}" = "s"]?dial)exten => s,n,Set(__DIALED_NUMBER=${MACRO_EXTEN})exten => s,n(dial),Macro(tl-dialout-base,${ARG1},${ARG2},${ARG3},${ARG4},${ARG5})Action Parameters. Define parameters that users fill in when assigning this action script. Click Add Argument to add one.
- Description: What this parameter does
- Type: The kind of value expected (Text, Phone, User Extension, Mailbox, Queue, etc.)
- Multiple: Whether more than one value is allowed
- Required: Whether the parameter must be filled in