Kamailio: Konfigurasi Awal di OpenWRT
Buat Database MySQL
Edit
cd /etc/kamailio/ nano -w /etc/kamailio/kamctlrc
Ubah
DBENGINE=SQLITE DB_PATH="/etc/kamailio/sqlite"
Setelah kamctlrc di ubah, jalankan
kamdbctl create kamailio.db
You can call this script without any parameter to get some help for the usage. You will be asked for the domain name Kamailio is going to serve (e.g., mysipserver.com) and the password of the 'root' MySQL user. The script will create a database named 'kamailio' containing the tables required by Kamailio. You can change the default settings in the kamctlrc file mentioned above.
Script ini akan membuat dua user di MySQL:
- kamailio - (dengan default password 'kamailiorw') - user which has full access rights to 'kamailio' database
- kamailioro - (dengan default password 'kamailioro') - user which has read-only access rights to 'kamailio' database
Do change the passwords for these two users to something different that the default values that come with sources.
Edit file konfigurasi
To fit your requirements for the VoIP platform, you have to edit the configuration file.
vi /etc/kamailio/kamailio.cfg
Aktifkan penggunaan MySQL. Paling tidak kita perlu menambahkan dibagian atas config file, seperti:
# use sqlite database loadmodule "db_sqlite.so"
#!ifndef DBURL #!define DBURL "sqlite:///etc/kamailio/kamailio.db" #!endif
If you changed the password for the 'kamailio' user of MySQL, you have to update the value for 'db_url' parameters.
You can browse kamailio.cfg online on GIT repository.
Edit /etc/default
vi vi /etc/default/kamailio
Ubah
RUN_KAMAILIO=yes
Menjalankan Kamailio
/etc/init.d/kamailio start /etc/init.d/kamailio stop
Menambahkan user
kamctl add <username> <password> <email>
seperti
kamctl add test testpasswd test@mysipserver.com
Atau tanpa e-mail