-
1.
下载安装文件
通过
svn
下载源码
< br>
#svn co /svnroot/opensips/trunk
opensips_head
2.
基本安装需求库
libmysqlclient-dev
mysql-
client-5.1
mysql-server-5.1
bison
flex
libncurses5-dev
3.
安装
#make
#make all
include_modules=
#make
install include_modules=
安装成功的安装目录,默认为
/usr/local/etc
4.
配置
配置
opensipsctlrc
文件
位置
/usr/local/etc/opensips/opensipsctlrc
,增加对数据库支持
# $$Id: opensipsctlrc 8289 2011-08-23
14:13:17Z razvancrainea $$
#
# The OpenSIPS configuration file for
the control tools.
#
# Here you can set variables used in
the opensipsctl and opensipsdbctl setup
# scripts. Per default all variables
here are commented out, the control tools
# will use their internal default
values.
## your SIP domain
# SIP_DOMAIN=
##
chrooted directory
#
$$CHROOT_DIR=
## database
type: MYSQL, PGSQL, ORACLE,
DB_BERKELEY
, or DBTEXT,
##
by default none is loaded
# If you want
to setup a database with opensipsdbctl, you must
at least specify
# this parameter.
DBENGINE=MYSQL
## database host
DBHOST=localhost
## database name (for ORACLE this is
TNS name)
DBNAME=opensips
# database path used by dbtext or
db_berkeley
DB_PATH=
## database read/write user
DBRWUSER=opensips
## password for database read/write
user
DBRWPW=
##
database super user (for ORACLE this is 'scheme-
creator' user)
DBROOTUSER=
# user name column
USERCOL=
# SQL definitions
# If you
change this definitions here, then you must change
them
# in db/schema/ too.
# FIXME
#
FOREVER=
#
DEFAULT_ALIASES_EXPIRES=$$FOREVER
#
DEFAULT_Q=
# DEFAULT_CALLID=
#
DEFAULT_CSEQ=
#
DEFAULT_LOCATION_EXPIRES=$$FOREVER
# Program to
calculate a message-digest fingerprint
# MD5=
# awk tool
# AWK=
# grep
tool
# GREP=
#
sed tool
# SED=
# Describe what additional tables to
install. Valid values for the variable
s
# 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 script.
# opensips standard modules
# STANDARD_MODULES=
#
msilo alias_db uri_db speeddial avpops
auth_db pdt dialog
#
dispatcher
dialplan drouting nathelper
load_balancer
# opensips
extra modules
#
EXTRA_MODULES=
## type of aliases used: DB - database
aliases; UL - usrloc aliases
## -
default: none
#
ALIASES_TYPE=
## control
engine: FIFO or UNIXSOCK
## - default
FIFO
# CTLENGINE=xmlrpc
## path to FIFO file
#
OSIPS_FIFO=
##
MI_CONNECTOR control engine: FIFO, UNIXSOCK,
UDP
, XMLRPC
#
MI_CONNECTOR=FIFO:/tmp/opensips_fifo
#
MI_CONNECTOR=UNIXSOCK:/tmp/
#
MI_CONNECTOR=UDP:192.168.2.133:8000
生成数据库脚本
#
opensipsdbctl create
MySQL password for
root:
INFO: test server
charset
INFO: creating database
opensips ...
INFO: Core OpenSIPS tables
succesfully created.
Install presence
related tables? (y/n): y
INFO: creating
presence tables into opensips ...
INFO:
Presence tables succesfully created.
Install tables for imc cpl siptrace
domainpolicy carrierroute userblacklist? (y/n):
y
INFO: creating extra
tables into opensips ...
INFO: Extra
tables succesfully created.
配置
文件位置
/usr/local/etc/opensips
更改监听网卡接口
# $$Id:
8758 2012-02-29 11:59:26Z vladut-paiu $$
#
# OpenSIPS residential
configuration script
#
by
OpenSIPS Solutions
#
# This script was generated via
#
the
# You can enable /
disable more features / functionalities by
#
re-generating the scenario with
different options.#
#
#
Please refer to the Core CookBook at:
#
/Resources/DocsCookbooks
# for a explanation of possible
statements, functions and parameters.
#
####### Global
Parameters #########
debug=3
log_stderror=no
log_facility=LOG_LOCAL0
fork=yes
children=4
/* uncomment the following
lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes
/* uncomment the next line
to enable the auto temporary blacklisting of
not
available destinations (default disabled) */
#disable_dns_blacklist=no
/* uncomment the next line to enable
IPv6 lookup after IPv4 dns
lookup failures (default
disabled) */
#dns_try_ipv6=yes
/* comment the next line to
enable the auto discovery of local aliases
based on revers DNS on IPs */
auto_aliases=no
#listen=udp:127.0.0.1:5060
# CUSTOMIZE ME
listen=udp:172.16.1.12:5060
# CUSTOMIZE ME
disable_tcp=yes
disable_tls=yes
####### Modules Section ########
#set module path
mpath=
#### SIGNALING module
loadmodule
####
StateLess module
loadmodule
#### Transaction Module
loadmodule
modparam(
< br>modparam(
modparam(
modpara
m(
#### Record Route Module
loadmodule
/* do not append
from tag to the RR (no need for this script) */
modparam(
####
MAX ForWarD module
loadmodule
#### SIP MSG OPerationS
module
loadmodule
#### FIFO Management Interface
loadmodule
modparam(
#### URI module
loadmodule
modparam(
-
-
-
-
-
-
-
-
-
上一篇:话题作文之以电视为话题写作文
下一篇:如何提升程序员的需求分析能力