Difference between revisions of "Kamailio: Konfigurasi Awal di OpenWRT"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
nano -w /etc/kamailio/kamctlrc | nano -w /etc/kamailio/kamctlrc | ||
− | Ubah | + | Ubah |
− | DBENGINE= | + | DBENGINE=SQLITE |
− | + | DB_PATH="/etc/kamailio/sqlite" | |
− | |||
Setelah kamctlrc di ubah, jalankan | Setelah kamctlrc di ubah, jalankan | ||
− | kamdbctl create | + | 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. | 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. | ||
Line 34: | Line 33: | ||
Aktifkan penggunaan MySQL. Paling tidak kita perlu menambahkan dibagian atas config file, seperti: | Aktifkan penggunaan MySQL. Paling tidak kita perlu menambahkan dibagian atas config file, seperti: | ||
− | #! | + | # use sqlite database |
− | #!define | + | 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. | If you changed the password for the 'kamailio' user of MySQL, you have to update the value for 'db_url' parameters. | ||
Line 42: | Line 45: | ||
You can browse kamailio.cfg online on GIT repository. | 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 start | ||
/etc/init.d/kamailio stop | /etc/init.d/kamailio stop | ||
− | |||
− | + | ==Menambahkan user== | |
− | + | kamctl add <username> <password> <email> | |
+ | |||
+ | seperti | ||
kamctl add test testpasswd test@mysipserver.com | kamctl add test testpasswd test@mysipserver.com | ||
− | + | Atau tanpa e-mail | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Referensi== | ==Referensi== | ||
* http://www.kamailio.org/wiki/install/4.2.x/git | * http://www.kamailio.org/wiki/install/4.2.x/git |
Latest revision as of 06:07, 30 December 2014
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