AS

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.zip

Installs 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 меню.
175 charsno explicit “when” trigger
Intermediate

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

You give it
Extension or dialplan context to verify
You get back
Execution trace of simulated call flow

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:

  1. 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
  2. Access Asterisk CLI in the Docker container:

    # Get container ID
    docker ps | grep mikopbx
    
    # Access Asterisk CLI
    docker exec -it <container_id> asterisk -rvvv
    
  3. 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>"
    
  4. 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"
    
  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"
    
  6. 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
    
  7. 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 matched
    

    Call Recording:

    # Verify recording is enabled
    docker exec <id> asterisk -rx "dialplan show" | grep -i "mixmonitor"
    
  8. 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"
    
  9. Report test results in this format:

    ## 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 Execution
    
    <relevant dialplan snippet> ```

    Issues Found

    • <issue 1>: <description><recommendation>
    • <issue 2>: <description><recommendation>

    Recommendations

    • <actionable fix 1>
    • <actionable fix 2>
  10. 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

  1. Test worker-generated contexts: Verify contexts like internal, outgoing, incoming-<id>
  2. Module integration: Test custom module dialplan hooks
  3. Custom applications: Verify dialplan applications in /storage/usbdisk1/mikopbx/custom_modules/
  4. 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:

  1. Test scenario description
  2. Step-by-step call flow
  3. Success/failure status for each verification point
  4. Actual dialplan code tested
  5. Issues found with recommendations
  6. 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

Access to Asterisk CLI in DockerExisting Asterisk dialplan

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.

SkillInstallsUpdatedSafetyDifficulty
asterisk-tester (this skill)12moReviewIntermediate
python-testing-patterns772moReviewIntermediate
chrome-devtools417moReviewIntermediate
bats97moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

sqlite-inspector

mikopbx

Проверка консистентности данных в SQLite баз данных MikoPBX после операций REST API. Использовать при валидации результатов API, отладке проблем с данными, проверке связей внешних ключей или инспектировании CDR записей для тестирования.

568

log-analyzer

mikopbx

Анализ логов Docker контейнера для диагностики проблем и мониторинга здоровья системы. Использовать при отладке ошибок, отслеживании процессов воркеров, исследовании проблем API или мониторинге поведения системы после тестов.

213

openapi-analyzer

mikopbx

Извлечение и анализ OpenAPI 3.1.0 спецификации из MikoPBX для валидации эндпоинтов. Использовать при проверке соответствия API, генерации тестов, проверке схем эндпоинтов или интеграции с навыками endpoint-validator и api-test-generator.

25

api-test-generator

mikopbx

Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.

16

asterisk-validator

mikopbx

Валидация конфигурационных файлов Asterisk и анализ логов на корректность и best practices. Использовать при отладке проблем запуска Asterisk, проверке изменений конфигурации или проверке ошибок после регенерации воркерами.

13

auth-token-manager

mikopbx

Получение валидных JWT Bearer токенов для аутентификации MikoPBX REST API v3. Использовать когда нужно тестировать API эндпоинты, отлаживать проблемы аутентификации или при возникновении ошибок 401 Unauthorized. Автоматически обрабатывает вход с username/password и возвращает готовый к использованию access token.

15

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.

77204

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.

41157

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.

991

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.

587

performance-profiling

davila7

Performance profiling principles. Measurement, analysis, and optimization techniques.

633

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".

328

Search skills

Search the agent skills registry