Noojee Provision Installation guide
The following provides a brief guide to installing and using Noojee Provision for Asterisk.
Requirements
Noojee Provision has the following requirements:
- Asterisk 1.2 or above ( Noojee Provision may work with earlier version but it has not been tested).
- Java runtime environment (JRE) 1.6
- MySQL 5.23 or above
- Asterisk realtime SIP
- DHCP service
Package based Installation
A debian (Ubuntu) package exists for Noojee Provision. Follow the instructions for installing NJ Admin via its debian package as the NJ provision package is dependant on the NJ Admin package.
Simply run the following command:
sudo apt-get install njprovision
You will be prompted to enter a number of parameters such as the asterisk servers ip address, mysql server IP address, username and password.
Note: I've attached the package to this page until it is placed into our repository. You can install it from a local directory by running:
dpkg -i *.deb
Manual Installation of Noojee Provision
- Install Asterisk 1.2 or above
- Install MySQL 5.23 or above
- Install Java Runtime Environment (JRE) 1.6 or above
- Install Noojee Provision from the deb package
- Edit the mysql config file /etc/my.cnf and make certain it contains the following line in section [mysqld]
lower_case_table_names = 1 - Start MySQL
- Run 'mysql' from the command prompt, e.g. >mysql
- Type 'show databases;' in the mysql shell
- If 'asterisk' is listed as one of the databases then skip to step 7 otherwise do step 6
- Create the Asterisk database
- java -jar NoojeeProvision.jar --initDB
- Create a user account on MySQL with permissions to create a database
- grant create, insert, update, select on asterisk.* to asterisk@localhost identified by 'asterisk'
- flush privileges
- From the /opt/njprovision directory:
- Edit the file config/NoojeeProvision.xml
- Update the AsteriskServer Update the TFTP and HTTP sections with the Asterisk Server IP address
- Update the entry MySQLServer ENTITY with the IP address of your MySQL server
- Update the entry MySQLDatabase ENTITY with the name of the asterisk database (usually 'asterisk').
- Update the MySQLUsername ENTITY entry with the name of the MySQL account you created above
- Update the MySQLPassword ENTITY entry with the MySQL password for the above account
- Update the Country, AreaCode and Timezone entries according to your requirements.
- Create the asterisk realtime SIP table (sip_buddies) by running:
- java -jar NoojeeProvision.jar --initSIP
- Create the asterisk relatime voicemail table (voicemail_users) by running:
- java -jar NoojeeProvision.jar --initVM
- Create the Noojee Provision specific tables by running:
- java -jar NoojeeProvision.jar --init
- Configure Asterisk realtime SIP
- Start Asterisk
- Add an option tftp-server-name entry to your dhcp service and restart it. (see the sample dhcpd.conf file in the config directory).
- Deploy the the script njprovision into /etc/init.d/njprovision
- Register the startup script by running:
- update-rc.d njprovision defaults
- Create the log directories as follows
-
sudo mkdir /var/log/njprovision
-
- Start the njprovision service
-
sudo /etc/init.d/njprovision start
-
- Test the system by plugging a phone into the LAN.
- Test that NJ Provision starts after a reboot.
Configuring Noojee Provision
NoojeeProvision.xml
The configuration of Noojee Provision is controlled by the configuration file NoojeeProvions .xml. The NoojeeProvision.xml is stored in the config directory e.g. /opt/njprovision/config/NoojeeProvision.xml
Database.jocl
The file config/database.jocl controls how NJ Provision access the My SQL database.
Log4j.xml
The log4j.xml file control the log level of NJ Provision.