Thank you for considering contributing to voip-stack! This project aims to provide a production-ready VoIP infrastructure stack, and contributions from the community help make it better.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Submitting Changes
- Coding Standards
- Testing Guidelines
- Documentation
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the issue
- Expected behavior vs. actual behavior
- Environment details (OS, VM specs, component versions)
- Logs (sanitized of any sensitive information)
- Configuration (sanitized)
Use the bug report template.
Feature suggestions are welcome! Please:
- Check existing issues to see if it's already proposed
- Provide clear use case and rationale
- Consider phasing (which phase does this fit into?)
- Think about compatibility with existing components
Use the feature request template.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass
- Commit with clear messages (see Commit Messages)
- Push to your fork
- Create a Pull Request
- macOS with Apple Silicon (M1/M2/M3/M4)
- 16GB+ RAM recommended
- libvirt/QEMU virtualization installed
- devstack-core running (Vault, PostgreSQL, Redis, etc.)
- Ansible installed on host
# Clone your fork
git clone https://github.com/yourusername/voip-stack.git
cd voip-stack
# Copy environment template
cp .env.example .env
# Edit .env with your configuration
vim .env
# Ensure devstack-core is running
cd ~/devstack-core && ./devstack start --profile standard
# Create and start VMs with libvirt
cd ~/voip-stack/libvirt
./create-vms.sh create
./create-vms.sh start
# Provision VMs with Ansible
cd ~/voip-stack
./scripts/ansible-run.sh provision-vms# Run all Phase 1 tests
./tests/run-phase1-tests.sh
# Run specific test suites
cd tests/integration
./test-vault-integration.sh
./test-opensips-asterisk.sh
# Run SIPp scenarios
cd tests/sipp
./scripts/run-basic-call-test.sh- Update documentation for any user-facing changes
- Add/update tests to cover your changes
- Ensure CI passes (when Phase 4 CI/CD is implemented)
- Update CHANGELOG.md with your changes
- Request review from maintainers
- Address feedback promptly
- Code follows project style guidelines
- All tests pass
- Documentation updated
- CHANGELOG.md updated
- No sensitive data in commits (secrets, real IPs, etc.)
- Commit messages are clear and descriptive
- Use fully qualified collection names (e.g.,
ansible.builtin.template) - YAML: 2-space indentation
- Name all tasks clearly
- Use variables from Vault for secrets
- Tag tasks appropriately (e.g.,
tags: [opensips, config]) - Include comments for complex logic
Example:
- name: Install OpenSIPS from official repository
ansible.builtin.apt:
name: opensips
state: present
update_cache: yes
tags: [opensips, install]- Use
#!/bin/bashshebang - Set error handling:
set -euo pipefail - Quote variables:
"${VAR}"not$VAR - Include usage function for user-facing scripts
- Add comments explaining non-obvious logic
Example:
#!/bin/bash
set -euo pipefail
VAULT_ADDR="${VAULT_ADDR:-http://192.168.64.1:8200}"- Use Jinja2 templates for dynamic configs
- Comment sections clearly
- Use variables for all environment-specific values
- Include examples in comments
Follow conventional commit format:
<type>: <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Adding/updating testschore: Maintenance tasks
Example:
feat: Add Kamailio dispatcher failover support
- Implement dispatcher module configuration
- Add health checks for RTPEngine instances
- Configure automatic failover with ds_select_dst
- Add Prometheus metrics for dispatcher status
Closes #42
- Integration tests: Required for all new features
- Functional tests: Required for SIP call flows
- Security tests: Required for TLS/SRTP changes
- Load tests: Optional but encouraged
- Descriptive names:
test-opensips-registration-with-auth.sh - Clear assertions: Use explicit success/failure checks
- Cleanup: Always clean up test resources
- Idempotent: Tests should be repeatable
- Isolated: Don't depend on other tests
Example:
#!/bin/bash
set -euo pipefail
test_name="OpenSIPS Registration with Authentication"
# Setup
echo "Running: ${test_name}"
extension="1001"
password="$(vault kv get -field=password secret/extensions/${extension})"
# Test
sipp -sf scenarios/register.xml \
-s "${extension}" \
-ap "${password}" \
-m 1 \
192.168.64.10:5060
# Verify
if [ $? -eq 0 ]; then
echo "✓ ${test_name} passed"
exit 0
else
echo "✗ ${test_name} failed"
exit 1
fi- Markdown format for all docs
- Clear headings and structure
- Code examples for all procedures
- Link to related docs
- Keep updated with code changes
When adding features, update:
- README.md: If user-facing feature
- Architecture docs: If architectural change
- Installation guide: If setup process changes
- Troubleshooting: If new issues might arise
- CHANGELOG.md: Always
- Be concise but complete
- Use examples liberally
- Explain why not just how
- Consider your audience (varying skill levels)
- Test instructions yourself
- Open an issue for questions about contributing
- Check existing issues and pull requests first
- Be patient: Maintainers are volunteers
Contributors will be recognized in:
- CHANGELOG.md for significant contributions
- README.md contributors section (coming in Phase 2)
- Release notes for major features
Thank you for helping make voip-stack better!