熱搜:win11繞過(guò)硬件限制安裝 一鍵重裝Win10系統(tǒng) 最干凈的u盤啟動(dòng)盤 真正純凈版的win7系統(tǒng)
時(shí)間:2015-02-16 11:06:00 作者:qipeng 來(lái)源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪問(wèn): https://m.xitongzhijia.net/xtjc/20150216/38824.html 手機(jī)查看 評(píng)論 反饋
Kamailio是一款sip服務(wù)器,能夠注冊(cè)服務(wù)器、重定向服務(wù)器,那么CentOS 6.0系統(tǒng)要如何安裝Kamailio呢?下面小編將針對(duì)Kamailio的安裝配置給大家做個(gè)詳細(xì)介紹。
1.編譯安裝
下載源碼
# cd ~
# wget https://www.kamailio.org/pub/kamailio/latest/src/kamailio-3.3.2_src.tar.gz
# tar zxvf kamailio-3.3.2_src.tar.gz
# cd kamailio-3.3.2
# make FLAVOUR=kamailio cfg
用自己熟悉的編輯工具打開“modules.lst”文件,找到“exclude_modules”變量,刪除db_mysql字段(這里可以根據(jù)自己的需要調(diào)整編譯的模塊)。然后編譯:
# make all
# make install
缺省情況下,Kamailio的可執(zhí)行文件安裝在“/usr/local/sbin”路徑下,配置文件安裝在“/usr/local/etc/kamailio”路徑下。
幾個(gè)可執(zhí)行文件功能如下:
kamailio - Kamailio服務(wù)器的執(zhí)行文件
kamdbctl - 創(chuàng)建和管理數(shù)據(jù)庫(kù)的腳本
kamctl - 管理和控制Kamailio服務(wù)器的腳本
sercmd - CLI,一個(gè)命令行工具,訪問(wèn)提供Kamailio服務(wù)器的接口
2.配置
配置環(huán)境變量:
Kamailio的環(huán)境變量存儲(chǔ)在/usr/local/etc/kamailio/kamctlrc文件中,安裝時(shí),就已經(jīng)安裝好模板文件了,只需要編輯一些簡(jiǎn)單的配置項(xiàng)即可。
# cat /usr/local/etc/kamailio/kamctlrc
# $Id$
#
# The Kamailio configuration file for the control tools.
#
# Here you can set variables used in the kamctl and kamdbctl setup
# scripts. Per default all variables here are commented out, the control tools
# will use their internal default values.
## your SIP domain
SIP_DOMAIN=kamailio.org
## chrooted directory
# $CHROOT_DIR=“/path/to/chrooted/directory”
## database type: MYSQL, PGSQL, Oracle, DB_BERKELEY, or DBTEXT, by default none is loaded
# If you want to setup a database with kamdbctl, you must at least specify
# this parameter.
DBENGINE=MYSQL
## database host
DBHOST=localhost
## database name (for ORACLE this is TNS name)
DBNAME=openser
# database path used by dbtext or db_berkeley
# DB_PATH=“/usr/local/etc/kamailio/dbtext”
## database read/write user
DBRWUSER=openser
## password for database read/write user
DBRWPW=“openserrw”
## database read only user
# DBROUSER=openserro
DBROUSER=openserro
## password for database read only user
DBROPW=openserro
## database super user (for ORACLE this is ‘scheme-creator’ user)
DBROOTUSER=“root”
# user name column
USERCOL=“username”
# SQL definitions
# If you change this definitions here, then you must change them
# in db/schema/entities.xml too.
# FIXME
# FOREVER=“2020-05-28 21:32:15”
# DEFAULT_ALIASES_EXPIRES=$FOREVER
# DEFAULT_Q=“1.0”
# DEFAULT_CALLID=“Default-Call-ID”
# DEFAULT_CSEQ=“13”
# DEFAULT_LOCATION_EXPIRES=$FOREVER
# Program to calculate a message-digest fingerprint
# MD5=“md5sum”
# awk tool
# AWK=“awk”
# If you use a system with a grep and egrep that is not 100% gnu grep compatible,
# e.g. solaris, install the gnu grep (ggrep) and specify this below.
#
# grep tool
# GREP=“grep”
# egrep tool
# EGREP=“egrep”
# sed tool
# SED=“sed”
# tail tool
# LAST_LINE=“tail -n 1”
# expr tool
# EXPR=“expr”
# Describe what additional tables to install. Valid values for the variables
# below are yes/no/ask. With ask (default) it will interactively ask the user
# for an answer, while yes/no allow for automated, unassisted installs.
#
# If to install tables for the modules in the EXTRA_MODULES variable.
# INSTALL_EXTRA_TABLES=ask
# If to install presence related tables.
# INSTALL_PRESENCE_TABLES=ask
# Define what module tables should be installed.
# If you use the postgres database and want to change the installed tables, then you
# must also adjust the STANDARD_TABLES or EXTRA_TABLES variable accordingly in the
# kamdbctl.base script.
# Kamailio standard modules
# STANDARD_MODULES=“standard acc lcr domain group permissions registrar usrloc msilo
# alias_db uri_db speeddial avpops auth_db pdt dialog dispatcher
# dialplan”
# Kamailio extra modules
# EXTRA_MODULES=“imc cpl siptrace domainpolicy carrierroute userblacklist htable purple”
## type of aliases used: DB - database aliases; UL - usrloc aliases
## - default: none
# ALIASES_TYPE=“DB”
## control engine: FIFO or UNIXSOCK
## - default FIFO
# CTLENGINE=“FIFO”
## path to FIFO file
# OSER_FIFO=“FIFO”
## check ACL names; default on (1); off (0)
# VERIFY_ACL=1
## ACL names - if VERIFY_ACL is set, only the ACL names from below list
## are accepted
# ACL_GROUPS=“local ld int voicemail free-pstn”
## verbose - debug purposes - default ‘0’
VERBOSE=1
## do (1) or don‘t (0) store plaintext passwords
## in the subscriber table - default ’1‘
# STORE_PLAINTEXT_PW=0
## OPENSER START Options
## PID file path - default is: /var/run/kamailio.pid
# PID_FILE=/var/run/kamailio.pid
PID_FILE=/var/run/kamailio.pid
## Extra start options - default is: not set
# example: start Kamailio with 64MB share memory: STARTOPTIONS=“-m 64”
# STARTOPTIONS=
打開/usr/local/etc/kamailio/kamailio.cfg,添加下面幾行(��該添加在“####### Defined Values #########”這一行之前):
。。。。。。
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_NAT
。。。。。。
執(zhí)行下面命令創(chuàng)建DB:
# /usr/local/sbin/kamdbctl create
3. 啟動(dòng)Kamailio服務(wù)
# /usr/local/sbin/kamctl start
4. 監(jiān)視Kamailio
# /usr/local/sbin/kamctl moni
5. 添加用戶帳號(hào)
# kamctl add 1000 1000
其中第一個(gè)1000為username;第二個(gè)1000為password,添加完畢后,配置你的SIP終端注冊(cè)。
上面就是CentOS 6.0安裝Kamailio的方法介紹了,Kamailio的編譯安裝需要下載源碼,只需進(jìn)行一些簡(jiǎn)單的配置即可,配置好后添加用戶賬號(hào)就可以使用了。
發(fā)表評(píng)論
共0條
評(píng)論就這些咯,讓大家也知道你的獨(dú)特見解
立即評(píng)論以上留言僅代表用戶個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)