This project provides the following plugins for Asterisk with MongoDB;
- MongoDB configuration engine,
- MongoDB CDR backend,
and the development and test environment as well.
You can use the patches to make asterisk with ast_mongo;
$ wget -nv "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-x" -O - | tar -zxf -
$ cd asterisk-x
$ wget https://github.com/minoruta/ast_mongo/blob/master/asterisk/patches/ast_mongo-x.patch
$ patch -p1 -i ast_mongo-x.patch
$ ./bootstrap.sh
$ ./configure
$ make
$ sudo make install
$ ...
This is another opiton to test ast_mongo;
git clone https://github.com/minoruta/ast_mongo.git
- Launch the mongodb VM to make backend MongoDB service.
- Launch the asterisk VM to build and run Asterisk server.
- Launch the nodejs VM to execute function tests.
desktop$ git clone https://github.com/minoruta/ast_mongo.git
desktop$ cd ast_mongo
desktop$ cd mongodb ; select mongodb VM
desktop$ vagrant up ; launch it as MongoDB server with test data
...
desktop$ cd ../asterisk ; select asterisk VM
desktop$ vagrant up ; launch it and build and run Asterisk
...
desktop$ cd ../nodejs ; select nodejs VM
desktop$ vagrant up ; launch it and prepare an environment to test
desktop$ vagrant ssh ; login it
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.19.0-25-generic x86_64)
...
vagrant@nodejs:~$ cd nodejs/res_config_mongodb/
vagrant@nodejs:~/nodejs/res_config_mongodb$ npm test ; start the test
> [email protected] test /vagrant/nodejs/res_config_mongodb
> make
A PJSIP UAS managed by res_config_mongodb
✓ should be offline at first (227ms)
✓ with unknown user should get 401 (227ms)
✓ with invalid password should get 401 (40ms)
✓ with right account should be online (109ms)
✓ with invalidated account should get 401 (73ms)
✓ should be offline at last (74ms)
6 passing (2s)
CDR by cdr_mongodb
✓ should log a call transaction (95ms)
1 passing (1s)
vagrant@nodejs:~/nodejs/res_config_mongodb$
This project adds the three VMs in your local network;
VM | Function | Guest OS | mDNS name |
---|---|---|---|
mongodb | provides backend MongoDB service | Ubuntu 14.04 | mongodb.local |
asterisk | provides an evironment to build and run Asterisk | Ubuntu 14.04 | asterisk.local |
nodejs | provides an evironment to test Asterisk | Ubuntu 14.04 | nodejs.local |
This project is developed under the following environments;
- Vagrant 1.8.4
- box: parallels/ubuntu-14.04, v1.0.10
- plugin: vagrant-parallels (1.6.1)
- with: Parallels Desktop for Mac, version 10.4
- The Vagrantfiles of this project are written for vagrant-parallels.
- MacBook Pro, OS X El Capitan version 10.11, 2 cores, 8GB memory.
- Licenses:
- The related programs for Asterisk:
- GNU GENERAL PUBLIC LICENSE Version 2
- Any other resources and files:
- The MIT License (MIT)
- The related programs for Asterisk:
- Copyright: (C) 2016, KINOSHITA minoru