万象系统之家 - 系统光盘下载网站!

当前位置:万象系统之家 > 系统教程 > CentOS 6.0安装配置Kamailio

CentOS 6.0如何安装配置Kamailio

时间:2015-02-16 11:06:00 作者:qipeng 来源:万象系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150216/38824.html 手机查看 评论

  Kamailio是一款sip服务器,能够注册服务器、重定向服务器,那么CentOS 6.0系统要如何安装Kamailio呢?下面小编将针对Kamailio的安装配置给大家做个详细介绍。

 CentOS 6.0如何安装配置Kamailio

  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字段(这里可以根据自己的需要调整编译的模块)。然后编译:

  # make all

  # make install

  缺省情况下,Kamailio的可执行文件安装在“/usr/local/sbin”路径下,配置文件安装在“/usr/local/etc/kamailio”路径下。

  几个可执行文件功能如下:

  kamailio - Kamailio服务器的执行文件

  kamdbctl - 创建和管理数据库的脚本

  kamctl - 管理和控制Kamailio服务器的脚本

  sercmd - CLI,一个命令行工具,访问提供Kamailio服务器的接口

  2.配置

  配置环境变量:

  Kamailio的环境变量存储在/usr/local/etc/kamailio/kamctlrc文件中,安装时,就已经安装好模板文件了,只需要编辑一些简单的配置项即可。

  # 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

  。。。。。。

  执行下面命令创建DB:

  # /usr/local/sbin/kamdbctl create

  3. 启动Kamailio服务

  # /usr/local/sbin/kamctl start

  4. 监视Kamailio

  # /usr/local/sbin/kamctl moni

  5. 添加用户帐号

  # kamctl add 1000 1000

  其中第一个1000为username;第二个1000为password,添加完毕后,配置你的SIP终端注册。

  上面就是CentOS 6.0安装Kamailio的方法介绍了,Kamailio的编译安装需要下载源码,只需进行一些简单的配置即可,配置好后添加用户账号就可以使用了。

发表评论

0

没有更多评论了

评论就这些咯,让大家也知道你的独特见解

立即评论

以上留言仅代表用户个人观点,不代表万象系统之家立场

其他版本软件

热门教程

人气教程排行

Linux系统推荐

本站发布的系统仅为个人学习测试使用,请在下载后24小时内删除,不得用于任何商业用途,否则后果自负,请支持购买微软正版系统!

如侵犯到您的权益,请及时通知我们,我们会及时处理,对系统之家有任何投诉或建议,请与管理员联系. QQ:346231061

Copyright2024 万象系统之家(www.maxdo.tech) 版权所有 沪ICP备2021023961号-5