asterisk-validator
This tool validates syntax in MikoPBX configuration files and analyzes logs to detect errors or deviations.
Install
mkdir -p .claude/skills/asterisk-validator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5665" && unzip -o skill.zip -d .claude/skills/asterisk-validator && rm skill.zipInstalls to .claude/skills/asterisk-validator
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 и анализ логов на корректность и best practices. Использовать при отладке проблем запуска Asterisk, проверке изменений конфигурации или проверке ошибок после регенерации воркерами.Key capabilities
- →Parses Asterisk configuration files for syntax errors
- →Audits logs for runtime exceptions and warnings
- →Verifies configuration alignment with MikoPBX best practices
- →Accesses containerized Asterisk files for remote validation
How it works
Runs validation scripts via Docker exec to analyze Asterisk config files and check logs for runtime consistency.
Inputs & outputs
When to use asterisk-validator
- →Check pjsip.conf syntax for errors
- →Audit Asterisk system logs
- →Verify configuration file integrity after regeneration
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:
-
Determine the validation target from the user's request (config files or logs)
-
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 -
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
- Syntax errors: Use
-
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 - Error messages: Search for
-
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" -
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> -
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
- Verify worker-generated configs have proper headers with generation timestamp
- Check database consistency with configuration files
- Verify custom files in
/storage/usbdisk1/mikopbx/custom_modules/ - Check fail2ban integration for security rules
Output format
Always provide:
- Clear status (✅/⚠️/❌)
- Issue count and severity
- Specific locations (file:line)
- Recommended fixes
- Links to documentation when helpful
Be thorough but concise. Focus on actionable information.
When not to use it
- →Non-Asterisk PBX systems
- →Tasks not involving configuration or log analysis
Prerequisites
Limitations
- →Requires active Docker environment
- →Limited to the scope of MikoPBX Asterisk deployments
How it compares
It enables direct, environment-specific validation of generated PBX configs, detecting errors that generic linters might miss.
Compared to similar skills
asterisk-validator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| asterisk-validator (this skill) | 1 | 9mo | Review | Intermediate |
| analyzing-logs | 14 | 27d | Review | Beginner |
| sentry | 10 | 4mo | Caution | Beginner |
| obsidian-incident-runbook | 3 | 27d | 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
analyzing-logs
jeremylongshore
Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.
sentry
openai
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.
obsidian-incident-runbook
jeremylongshore
Troubleshoot Obsidian plugin failures with systematic incident response. Use when plugins crash, data is corrupted, or users report critical issues with your Obsidian plugin. Trigger with phrases like "obsidian crash", "obsidian plugin broken", "obsidian incident", "debug obsidian failure", "obsidian emergency".
obsidian-observability
jeremylongshore
Set up comprehensive logging and monitoring for Obsidian plugins. Use when implementing debug logging, tracking plugin performance, or setting up error reporting for your Obsidian plugin. Trigger with phrases like "obsidian logging", "obsidian monitoring", "obsidian debug", "track obsidian plugin".
langsmith-observability
davila7
LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.
network-info
UKGovernmentBEIS
Gather network configuration and connectivity information including interfaces, routes, and DNS