Asterisk mesh network config generator. This gem is under construction.
$ gem install asterisk_mesh
$ bundle exec exe/asterisk_mesh --help
Usage: asterisk_mesh.rb [options]
-n, --network=NETWORK_FILE Sets network file (asterisk_mesh.yml by default)
-v, --version Prints version number
---
asterisk_mesh:
output: /Users/deploy/servers/shared_mesh
nodes:
- extension: 1XX
primary_digits: 3
name: north
host: north.srv.acme.com
- extension: 2XX
primary_digits: 3
name: west
host: west.srv.acme.com
- extension: 3XX
primary_digits: 3
name: south
host: south.srv.acme.com
- extension: 4XX
primary_digits: 3
name: east
host: east.srv.acme.com
- extension: 1XX
primary_digits: 3
prefix: "1"
operator_prefix: acme
name: partners
host: partners.server.com
$ bundle exec exe/asterisk_mesh
Parsing network file...OK
Building network...OK
Exporting nodes to /Users/deploy/servers/shared_mesh/...OK
5 nodes have been exported (5 static, 0 dynamic):
STATIC : north
STATIC : west
STATIC : south
STATIC : east
STATIC : partners
.
├── east
│ ├── extensions.conf
│ ├── iax.conf
│ └── iax_register.conf
├── north
│ ├── extensions.conf
│ ├── iax.conf
│ └── iax_register.conf
├── partners
│ ├── extensions.conf
│ ├── iax.conf
│ └── iax_register.conf
├── south
│ ├── extensions.conf
│ ├── iax.conf
│ └── iax_register.conf
└── west
├── extensions.conf
├── iax.conf
└── iax_register.conf
Each config file can be included on each node respectively.
- Write proper README.md.
- Move dialplan and iax config from classes to external template files.
- Fair static nodes load rotation (dial macros?). For now, it is always first static node has high load.
- Load configuration from external yml file / network file.
- Dry run mode.
- Verbosity and logging.
- Code documentation.
Bug reports and pull requests are welcome on GitHub at https://github.com/ybinzu/asterisk_mesh.
The gem is available as open source under the terms of the MIT License.