asterisk-tester
Provides tools to simulate and verify Asterisk call routing, IVR logic, and time conditions.
Install
mkdir -p .claude/skills/asterisk-tester && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4943" && unzip -o skill.zip -d .claude/skills/asterisk-tester && rm skill.zipInstalls to .claude/skills/asterisk-tester
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Тестирование сценариев Asterisk dialplan и потоков звонков. Использовать при тестировании логики маршрутизации звонков, отладке проблем dialplan или проверке потоков IVR меню.Key capabilities
- →Simulates call flows through dialplan contexts
- →Validates IVR menu logic and navigation
- →Checks pattern matching and regex routing
- →Tests time-based call conditions
- →Verifies AGI/AMI integration responses
How it works
Executes standard Asterisk command-line utilities to parse dialplan logic and trigger test routines within a contained Docker environment.
Inputs & outputs
When to use asterisk-tester
- →Testing dialplan routing
- →Debugging IVR menu flows
- →Verifying time-based call conditions
About this skill
asterisk-dialplan-testing
Tests Asterisk dialplan scenarios and call flows to verify they work as expected.
What this skill does
- Tests dialplan contexts and extensions
- Simulates call flows through the dialplan
- Verifies routing logic and conditions
- Tests IVR menus and time conditions
- Validates AGI/AMI integrations
- Checks pattern matching and regular expressions
When to use this skill
Use this skill when:
- Creating or modifying dialplan scenarios
- Testing call routing logic
- Verifying IVR menu flows
- Debugging call issues
- Testing time-based routing
- Validating custom dialplan applications
How to use this skill
Simply describe what you want to test:
- "Test calling extension 201"
- "Simulate call flow through IVR menu"
- "Test emergency number routing"
- "Verify time condition for night mode"
- "Test pattern matching for international calls"
Instructions
You are an expert Asterisk dialplan tester. When invoked:
-
Understand the test scenario from the user's request:
- Which extension/pattern to test
- Expected call flow
- Conditions to verify (time, caller ID, etc.)
- Success criteria
-
Access Asterisk CLI in the Docker container:
# Get container ID docker ps | grep mikopbx # Access Asterisk CLI docker exec -it <container_id> asterisk -rvvv -
Analyze dialplan before testing:
# Show specific context docker exec <id> asterisk -rx "dialplan show <context>" # Show specific extension docker exec <id> asterisk -rx "dialplan show <extension>@<context>" # Search for pattern docker exec <id> asterisk -rx "dialplan show" | grep -A 10 "<pattern>" -
Use dialplan simulation tools:
# Test extension matching docker exec <id> asterisk -rx "dialplan show <number>@<context>" # Simulate call flow (requires custom AGI or debug) docker exec <id> asterisk -rx "core set verbose 5" docker exec <id> asterisk -rx "core set debug 5" -
Test with originate command for real call simulation:
# Originate a test call docker exec <id> asterisk -rx "channel originate Local/<extension>@<context> application Wait 10" # Test with specific caller ID docker exec <id> asterisk -rx "channel originate Local/<ext>@<ctx> application Playback demo-congrats" -
Monitor call flow in real-time:
# Enable verbose logging docker exec <id> asterisk -rx "core set verbose 10" # Watch dialplan execution docker exec <id> asterisk -rx "dialplan set debug on" # Follow logs during test docker exec <id> tail -f /var/log/asterisk/full -
Test specific scenarios:
IVR Testing:
# Check IVR structure docker exec <id> asterisk -rx "dialplan show ivr-<number>@<context>" # Test DTMF handling docker exec <id> asterisk -rx "channel originate Local/<ivr>@<ctx> application Read digits,/var/lib/asterisk/sounds/en/beep,1"Time Condition Testing:
# Check current time conditions docker exec <id> asterisk -rx "dialplan show" | grep -i "gotoiftime" # Verify time expressions # (requires checking dialplan logic)Pattern Matching:
# Test pattern match docker exec <id> asterisk -rx "dialplan show <test_number>@<context>" # Should show which pattern matchedCall Recording:
# Verify recording is enabled docker exec <id> asterisk -rx "dialplan show" | grep -i "mixmonitor" -
Database verification:
# Check extension in database docker exec <id> sqlite3 /cf/conf/mikopbx.db "SELECT * FROM extensions WHERE number='<ext>'" # Check routing rules docker exec <id> sqlite3 /cf/conf/mikopbx.db "SELECT * FROM m_IncomingRoutes" docker exec <id> sqlite3 /cf/conf/mikopbx.db "SELECT * FROM m_OutgoingRoutes" -
Report test results in this format:
<relevant dialplan snippet> ```## Dialplan Test Results ### Scenario: <description> - Status: ✅ Passed / ❌ Failed / ⚠️ Warning ### Test Configuration - Extension: <number> - Context: <context_name> - Caller ID: <callerid> - Time: <timestamp> ### Call Flow 1. [Step]: <action> → <result> 2. [Step]: <action> → <result> 3. ... ### Verification Points - ✅ Extension matched: <pattern> - ✅ Routing correct: <destination> - ❌ Recording failed: <reason> - ⚠️ Timeout occurred: <details> ### Dialplan ExecutionIssues Found
- <issue 1>: <description> → <recommendation>
- <issue 2>: <description> → <recommendation>
Recommendations
- <actionable fix 1>
- <actionable fix 2>
-
Common test patterns:
Basic extension call:
# Test extension 201 can receive calls docker exec <id> asterisk -rx "dialplan show 201@internal" docker exec <id> asterisk -rx "channel originate Local/201@internal application Playback demo-congrats"Outbound routing:
# Test outbound number pattern docker exec <id> asterisk -rx "dialplan show 79001234567@outgoing"IVR menu:
# Show IVR structure docker exec <id> asterisk -rx "dialplan show ivr-main@internal" # Test each menu option docker exec <id> asterisk -rx "dialplan show 1@ivr-main"
Advanced testing techniques
Test with AMI (Asterisk Manager Interface)
# Connect to AMI
docker exec <id> asterisk -rx "manager show connected"
# Can use curl for AMI actions
curl -u admin:password http://localhost:8088/asterisk/rawman?action=Originate&Channel=Local/201@internal&Exten=202&Context=internal&Priority=1
Test with AGI scripts
# Check AGI scripts
docker exec <id> ls -la /var/lib/asterisk/agi-bin/
# Test AGI execution
docker exec <id> /var/lib/asterisk/agi-bin/<script> < /dev/null
Load testing
# Generate multiple test calls (use with caution)
docker exec <id> asterisk -rx "channel originate Local/load-test@internal application Wait 30"
MikoPBX-specific testing
- Test worker-generated contexts: Verify contexts like
internal,outgoing,incoming-<id> - Module integration: Test custom module dialplan hooks
- Custom applications: Verify dialplan applications in
/storage/usbdisk1/mikopbx/custom_modules/ - Call detail records: Check CDR database after test calls
Safety guidelines
- Never test on production systems without proper planning
- Use Local channel for safe testing (no actual SIP calls)
- Clean up test calls: Always terminate test calls properly
- Monitor resources: Watch CPU/memory during load tests
- Backup configs: Before testing major changes
Useful debugging
# Enable all debugging
docker exec <id> asterisk -rx "core set verbose 10"
docker exec <id> asterisk -rx "core set debug 10"
docker exec <id> asterisk -rx "dialplan set debug on"
# Disable after testing
docker exec <id> asterisk -rx "core set verbose 0"
docker exec <id> asterisk -rx "core set debug 0"
docker exec <id> asterisk -rx "dialplan set debug off"
# Check active channels during test
docker exec <id> asterisk -rx "core show channels"
# Hangup stuck channels
docker exec <id> asterisk -rx "channel request hangup <channel_name>"
Output format
Always provide:
- Test scenario description
- Step-by-step call flow
- Success/failure status for each verification point
- Actual dialplan code tested
- Issues found with recommendations
- Relevant log excerpts if failures occurred
Be thorough, provide evidence (log outputs), and give actionable recommendations.
When not to use it
- →Production traffic testing
- →Testing SIP protocol-level connectivity
- →Debugging underlying hardware interfaces
Prerequisites
Limitations
- →Limited to simulated call paths
- →Cannot predict non-deterministic external conditions
- →Requires Docker container context
How it compares
Focuses on logic simulation and routing validation without requiring actual phone hardware.
Compared to similar skills
asterisk-tester side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| asterisk-tester (this skill) | 1 | 2mo | Review | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
| bats | 9 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mikopbx
View all by mikopbx →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
bats
OleksandrKucherenko
Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.
browser-daemon
noiv
Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.
performance-profiling
davila7
Performance profiling principles. Measurement, analysis, and optimization techniques.
obsidian-local-dev-loop
jeremylongshore
Configure Obsidian plugin development with hot-reload and fast iteration. Use when setting up development workflow, configuring test vaults, or establishing a rapid development cycle. Trigger with phrases like "obsidian dev loop", "obsidian hot reload", "obsidian development workflow", "develop obsidian plugin".