Package Information
Available Nodes
Documentation
n8n-nodes-asterisk

This is an n8n community node for Asterisk PBX integration using the ARI (Asterisk REST Interface).
n8n is a fair-code licensed workflow automation platform.
⭐ Features:
- ✅ Complete ARI Coverage - All 11 Asterisk REST Interface resources implemented (76 operations)
- 🎯 Production Ready - Comprehensive error handling and type safety
- 📱 Real-world Workflows - See WORKFLOW_EXAMPLES.md for practical use cases
- 🔧 Easy Integration - Works seamlessly with CRM, ticketing, storage, and notification systems
Quick Start
Install the node:
npm install n8n-nodes-asteriskConfigure Asterisk credentials in n8n:
- Base URL:
http://your-asterisk-server:8088 - Username: Your ARI username
- Password: Your ARI password
- Base URL:
Try a simple workflow:
- Trigger: Manual
- Node: Asterisk → Channels → List
- See all active calls!
Explore examples: Check WORKFLOW_EXAMPLES.md for production-ready workflows
Installation
Follow the installation guide in the n8n community nodes documentation.
Using npm
npm install n8n-nodes-asterisk
In n8n
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-asterisk - Click Install
Prerequisites
- n8n version 1.0.0 or later
- Node.js 20.10 or later
- Asterisk 12.0.0 or later with ARI enabled
Asterisk Configuration
Before using this node, you need to configure Asterisk to enable the ARI interface.
1. Enable ARI in ari.conf
Edit /etc/asterisk/ari.conf:
[general]
enabled = yes
pretty = no
[your_username]
type = user
read_only = no
password = your_password
2. Enable HTTP Server in http.conf
Edit /etc/asterisk/http.conf:
[general]
enabled = yes
bindaddr = 0.0.0.0
bindport = 8088
3. Reload Asterisk Configuration
asterisk -rx "module reload res_ari.so"
asterisk -rx "module reload res_http.so"
Credentials
This node requires Asterisk API credentials:
- Base URL: The base URL of your Asterisk server (e.g.,
http://localhost:8088) - Username: ARI username (configured in
ari.conf) - Password: ARI password (configured in
ari.conf)
Operations
Applications
Manage Stasis applications:
- List - List all Stasis applications
- Get - Get details of a Stasis application
- Subscribe - Subscribe an application to an event source
- Unsubscribe - Unsubscribe an application from an event source
Asterisk
System information and operations:
- Get Info - Get Asterisk system information (build, config, status, system)
- Ping - Ping Asterisk server (returns pong)
- List Modules - List all Asterisk modules
- Get Module - Get Asterisk module information
- Load Module - Load an Asterisk module
- Unload Module - Unload an Asterisk module
- Reload Module - Reload an Asterisk module
- Get Variable - Get the value of a global variable
- Set Variable - Set the value of a global variable
- Get Config Object - Retrieve a dynamic configuration object
- Update Config Object - Create or update a dynamic configuration object
- Delete Config Object - Delete a dynamic configuration object
- List Log Channels - Get Asterisk log channel information
- Add Log Channel - Add a log channel
- Delete Log Channel - Delete a log channel
- Rotate Log Channel - Rotate a log channel
Device States
Manage device states:
- List - List all ARI controlled device states
- Get - Retrieve the current state of a device
- Update - Change the state of a device controlled by ARI
- Delete - Destroy a device state controlled by ARI
Channels
Manage channels (calls) in Asterisk:
- List - List all active channels
- Get - Get channel details
- Create - Create/originate a new channel
- Delete - Hangup a channel
- Answer - Answer a channel
- Ring - Send ringing indication to channel
- Stop Ring - Stop ringing indication
- Play - Play media to a channel
- Record - Record audio from a channel
- Send DTMF - Send DTMF tones to a channel
- Mute - Mute a channel
- Unmute - Unmute a channel
- Hold - Put a channel on hold
- Unhold - Remove channel from hold
- Get Variable - Get the value of a channel variable
- Set Variable - Set the value of a channel variable
- Continue in Dialplan - Exit application and continue in dialplan
- Redirect - Redirect channel to another endpoint
Bridges
Manage call bridges for multi-party conferences:
- List - List all active bridges
- Get - Get bridge details
- Create - Create a new bridge
- Delete - Shut down a bridge
- Add Channel - Add a channel to a bridge
- Remove Channel - Remove a channel from a bridge
- Play - Play media to a bridge
- Record - Record a bridge
- Start Music on Hold - Play music on hold to a bridge
- Stop Music on Hold - Stop music on hold
Endpoints
Manage communication endpoints:
- List - List all endpoints
- List by Technology - List endpoints by technology (e.g., PJSIP, SIP, IAX2)
- Get - Get endpoint details
- Send Message - Send a message to an endpoint
Events
Generate user events:
- User Event - Generate a user event with custom variables
Mailboxes
Manage voicemail mailboxes:
- List - List all mailboxes
- Get - Retrieve the current state of a mailbox
- Update - Change the state of a mailbox
- Delete - Destroy a mailbox
Playbacks
Control media playback:
- Get - Get playback details
- Stop - Stop a playback
- Control - Control a playback (restart, pause, unpause, reverse, forward)
Recordings
Manage audio recordings:
- List Stored - List stored recordings
- Get Stored - Get stored recording details
- Delete Stored - Delete a stored recording
- Copy Stored - Copy a stored recording
- List Live - List live recordings
- Stop Live - Stop a live recording and store it
- Pause Live - Pause a live recording
- Resume Live - Resume a paused live recording
- Mute Live - Mute a live recording
- Unmute Live - Unmute a live recording
Sounds
Access available audio files:
- List - List all sounds with optional language and format filters
- Get - Get a sound's details
Practical Workflow Examples
Want to see real-world use cases? Check out WORKFLOW_EXAMPLES.md for detailed examples including:
- 📞 Automated Customer Callbacks - Call customers from database and connect to agents
- 🎯 Smart Call Routing - Route calls based on CRM data (VIP, open cases, etc.)
- ☁️ Call Recording to Cloud - Auto-upload recordings to S3/Google Drive with transcription
- 🚨 Emergency Escalation - Automatically page on-call team members
- 📅 Appointment Reminders - Automated reminder calls with DTMF confirmation
- 📊 Call Center Analytics - Real-time dashboards and monitoring
- 🤖 Interactive IVR - Dynamic menus with database lookups
- 📧 Voicemail to Email/Slack - Transcribe and forward voicemails
Each example includes complete workflow diagrams and step-by-step implementations.
Usage Examples
Example 1: Originate a Call
{
"resource": "channels",
"operation": "create",
"endpoint": "PJSIP/1000",
"additionalFields": {
"app": "hello-world",
"callerId": "n8n Automation <1234>",
"timeout": 30
}
}
Example 2: Create a Conference Bridge
{
"resource": "bridges",
"operation": "create",
"additionalFields": {
"type": "mixing",
"name": "Conference Room"
}
}
Example 3: Play Audio to Channel
{
"resource": "channels",
"operation": "play",
"channelId": "{{$json.id}}",
"media": "sound:hello-world"
}
Example 4: Record a Call
{
"resource": "channels",
"operation": "record",
"channelId": "{{$json.id}}",
"recordingName": "call-{{$now}}",
"format": "wav",
"additionalFields": {
"maxDurationSeconds": 300,
"beep": true,
"ifExists": "overwrite"
}
}
Media URIs
Asterisk ARI supports various media URI formats for playback:
sound:- Play a sound file from the sounds directory (e.g.,sound:hello-world)recording:- Play a previously made recording (e.g.,recording:my-recording)number:- Speak a number (e.g.,number:123)digits:- Speak digits (e.g.,digits:12345)characters:- Speak characters (e.g.,characters:abc)tone:- Play a tone (e.g.,tone:ring)
Compatibility
- Works with Asterisk 12.0.0 and later
- Tested with Asterisk 18, 20, and 21
- Requires ARI (Asterisk REST Interface) to be enabled
Resource Version Requirements
Some resources require specific Asterisk versions:
- Mailboxes: Requires Asterisk 12.1.0+
- Events (User Event): Requires Asterisk 12.3.0+
- All other resources: Asterisk 12.0.0+
Troubleshooting
404 Errors on Specific Resources:
- Check your Asterisk version:
asterisk -rx "core show version" - Ensure ARI is enabled in
ari.conf - Verify the resource is available:
curl -u username:password http://localhost:8088/ari/resource - Some resources (like Mailboxes) may not be available if not configured in Asterisk
Resources
- Asterisk Official Documentation
- ARI Documentation
- n8n Community Nodes Documentation
- Asterisk Configuration Guide
Resources Summary
| Resource | Operations | Description |
|---|---|---|
| Applications | 4 | Stasis application management |
| Asterisk | 16 | System info, modules, variables, config, logging |
| Bridges | 10 | Conference/call bridge management |
| Channels | 18 | Call/channel control and manipulation |
| Device States | 4 | Device state tracking and updates |
| Endpoints | 4 | Endpoint information and messaging |
| Events | 1 | User event generation |
| Mailboxes | 4 | Voicemail mailbox operations |
| Playbacks | 3 | Media playback control |
| Recordings | 10 | Call recording management |
| Sounds | 2 | Audio file resource access |
| Total | 76 | Complete ARI coverage |
Version History
1.3.2 (Logo & Documentation Update)
- FIXED: Updated Asterisk logo (proper 20KB SVG)
- ADDED: Version requirements and troubleshooting in README
- ADDED: Comprehensive workflow examples guide
- Package size: 164.6 kB unpacked
1.3.1 (Documentation Update)
- ADDED: Troubleshooting section for 404 errors
- ADDED: Resource version requirements documentation
- IMPROVED: Compatibility information
1.3.0 (Complete ARI Coverage)
- NEW: Device States resource - 4 operations for device state management
- NEW: Mailboxes resource - 4 operations for voicemail operations
- NEW: Sounds resource - 2 operations for audio file access
- NEW: Events resource - 1 operation for user event generation
- Total operations increased to 76 across 11 resources
- Complete coverage of all Asterisk ARI resources
- Enhanced voicemail and device state management
- Audio file discovery and management
1.2.0 (Configuration and Logging Update)
- NEW: Dynamic configuration operations - 3 operations for managing configuration objects
- NEW: Logging operations - 4 operations for log channel management
- Total operations increased to 65 across 7 resources
- Enhanced configuration management capabilities
- Log channel control and rotation
- Complete ARI Asterisk resource coverage
1.1.0 (System Operations Update)
- NEW: Applications resource - 4 operations for Stasis application management
- NEW: Asterisk resource - 9 operations for system information and control
- Total operations increased to 58 across 7 resources
- Enhanced system monitoring and management capabilities
- Module management (load/unload/reload)
- Global variable management
- System info and ping operations
1.0.0 (Initial Release)
- Complete ARI integration with 5 core resources
- Channels: 18 operations for call management
- Bridges: 10 operations for conference management
- Endpoints: 4 operations for endpoint management
- Playbacks: 3 operations for playback control
- Recordings: 10 operations for recording management
- Comprehensive error handling
- Full TypeScript support
Support
For support, please:
Check documentation:
- WORKFLOW_EXAMPLES.md - Practical workflow examples
- CACHE_CLEAR_STEPS.md - Troubleshooting icon/cache issues
- Troubleshooting section - Common issues and solutions
Community resources:
Report issues:
- GitHub Issues (for bugs and feature requests)
- Include Asterisk version and error messages
License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Cybernetic Node Composer
Note: This is a community-maintained node and is not officially supported by n8n or Asterisk.