asterisk-validator

0
0
Source

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

Install

mkdir -p .claude/skills/asterisk-validator && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5665" && unzip -o skill.zip -d .claude/skills/asterisk-validator && rm skill.zip

Installs to .claude/skills/asterisk-validator

About this skill

asterisk-config-validating

Validates Asterisk configuration files and analyzes logs to ensure they are correctly generated by MikoPBX workers and system methods.

What this skill does

  • Validates syntax of Asterisk configuration files (sip.conf, pjsip.conf, extensions.conf, etc.)
  • Checks for common configuration errors and warnings
  • Analyzes Asterisk logs for errors, warnings, and potential issues
  • Verifies that configurations follow MikoPBX generation patterns
  • Reports configuration inconsistencies and security issues

When to use this skill

Use this skill when:

  • After generating new Asterisk configurations via workers
  • Debugging Asterisk startup or runtime issues
  • Verifying configuration changes made by system methods
  • Analyzing Asterisk logs for errors or warnings
  • Checking if configurations follow best practices

How to use this skill

Simply invoke the skill and specify what you want to validate:

  • "Validate the current Asterisk configuration"
  • "Check pjsip.conf for errors"
  • "Analyze Asterisk logs for the last hour"
  • "Verify extensions.conf syntax"

Instructions

You are an expert Asterisk configuration validator. When invoked:

  1. Determine the validation target from the user's request (config files or logs)

  2. Access the Docker container to examine Asterisk files:

    # Get container ID
    docker ps | grep mikopbx
    
    # Access config files in container
    docker exec <container_id> cat /etc/asterisk/<config_file>
    
    # Access logs
    docker exec <container_id> tail -n 500 /storage/usbdisk1/mikopbx/log/asterisk/messages
    docker exec <container_id> tail -n 500 /var/log/asterisk/full
    
  3. For configuration validation, check:

    • Syntax errors: Use asterisk -rx "core reload" or check for parse errors
    • Common mistakes: Missing semicolons, incorrect contexts, invalid options
    • Security issues: Weak passwords, open access, missing encryption
    • MikoPBX patterns: Check if configs follow MikoPBX generation style
    • Cross-references: Verify that referenced contexts/extensions exist

    Key config locations:

    • Main configs: /etc/asterisk/
    • Generated configs: /etc/asterisk/ (check timestamps)
    • Backup configs: Check if backups exist
  4. For log analysis, examine:

    • Error messages: Search for ERROR, CRITICAL, FATAL
    • Warnings: Search for WARNING, WARN
    • Common issues:
      • Registration failures
      • Codec negotiation problems
      • NAT/network issues
      • Authentication failures
      • Dial failures
      • Memory leaks or performance issues

    Useful log commands:

    # Recent errors
    docker exec <id> grep -i error /storage/usbdisk1/mikopbx/log/asterisk/messages | tail -50
    
    # Registration issues
    docker exec <id> grep -i "registration" /var/log/asterisk/full | tail -50
    
    # Dial failures
    docker exec <id> grep -i "dial\|call" /var/log/asterisk/full | tail -100
    
  5. Test configuration loading:

    # Check if Asterisk can parse config
    docker exec <id> asterisk -rx "dialplan reload"
    docker exec <id> asterisk -rx "pjsip reload"
    docker exec <id> asterisk -rx "core show config mappings"
    
  6. Report findings in a structured format:

    ## Validation Results
    
    ### Configuration: <file_name>
    - Status: ✅ Valid / ⚠️ Warnings / ❌ Errors
    - Issues found: <count>
    
    ### Critical Issues
    - [Error/Warning]: <description>
    - Location: <file>:<line>
    - Recommendation: <fix>
    
    ### Warnings
    - <list of warnings>
    
    ### Log Analysis
    - Errors in last hour: <count>
    - Recent critical issues: <list>
    
    ### Recommendations
    - <actionable fixes>
    
  7. Provide actionable fixes:

    • Show the exact line/section with the issue
    • Suggest the correct configuration
    • Reference MikoPBX worker classes if relevant
    • Link to relevant Asterisk documentation

Important Docker paths

  • Asterisk configs: /etc/asterisk/
  • System logs: /storage/usbdisk1/mikopbx/log/system/messages
  • Asterisk logs: /storage/usbdisk1/mikopbx/log/asterisk/messages
  • Full log: /var/log/asterisk/full
  • Database: /cf/conf/mikopbx.db

Common validation commands

# Check Asterisk CLI status
docker exec <id> asterisk -rx "core show version"
docker exec <id> asterisk -rx "core show uptime"

# Verify config files exist
docker exec <id> ls -lah /etc/asterisk/

# Check for syntax errors in dialplan
docker exec <id> asterisk -rx "dialplan show"

# List SIP/PJSIP peers
docker exec <id> asterisk -rx "pjsip show endpoints"

# Check for module load errors
docker exec <id> asterisk -rx "module show like"

MikoPBX-specific checks

  1. Verify worker-generated configs have proper headers with generation timestamp
  2. Check database consistency with configuration files
  3. Verify custom files in /storage/usbdisk1/mikopbx/custom_modules/
  4. Check fail2ban integration for security rules

Output format

Always provide:

  1. Clear status (✅/⚠️/❌)
  2. Issue count and severity
  3. Specific locations (file:line)
  4. Recommended fixes
  5. Links to documentation when helpful

Be thorough but concise. Focus on actionable information.

sqlite-inspector

mikopbx

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

640

restapi-translations

mikopbx

Управление переводами REST API ключей (rest_*) для MikoPBX. Автоматически находит отсутствующие русские ключи в RestApi.php и синхронизирует их с исходным кодом. Использовать при проверке переводов API, после добавления новых endpoints или перед релизом.

00

openapi-analyzer

mikopbx

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

10

babel-compiler

mikopbx

Транспиляция ES6+ JavaScript в ES5 для совместимости с браузерами используя Docker-based Babel компилятор. Использовать при транспиляции JavaScript файлов после внесения изменений в ES6+ исходный код.

10

translations

mikopbx

Управление многоязычными переводами на 29 языков с приоритетом русского языка. Использовать при добавлении новых переводов, переводе на все языки, проверке консистентности или удалении устаревших ключей.

00

auth-token-manager

mikopbx

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

50

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

641968

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

590705

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318395

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

450339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.