2024年5月11日发(作者:)

Opensips配置文件******************

Opensips配置文件

####### 全局定义 (Global Parameters

文件的这一部分包含了OpenSIPS 的几个工作参

#######数,包括SIP服务的监听ip端口对和debug等级。#########

debug=3 #

设置日志级别,数值

-3

4

,默认

2

数越大,就会有更多的信息被写到日志。

#

设置为

4

系统的性能会下降的(

sluggish

log_stderror=no #

设置为

yes

服务器会打印调试信息到标准错误输出

#

设置为

no

syslog

会被使用

log_facility=LOG_LOCAL0

fork=yes #

设置了

yes

进程会在在后台运行,有时候在前台运行也很重要,可以来找到脚本

#

中的错误如果

fork disabled OpenSIPs

只能监听一个网卡,

tpc/tls

也会自

#

disabled

。 在单进程模式,只有

udp

接口允许。

#

每个

UDP

地址打开子进程数,不过对于

tcp

进程没有影响。

children=4

/* uncomment the following lines to enable debugging */

#debug=6

#fork=no

#log_stderror=yes

/* uncomment the next line to disable TCP (default on) */

#disable_tcp=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

/* uncomment the next line to disable the auto discovery of local aliases

based on revers DNS on IPs (default on) */

#auto_aliases=no

/* uncomment the following lines to enable TLS support (default off) */

#disable_tls = no

#listen = tls:your_IP:5061

#tls_verify_server = 1

#tls_verify_client = 1

#tls_require_client_certificate = 0

#tls_method = TLSv1

#tls_certificate = "/usr/local/etc/opensips/tls/user/"

1

Opensips配置文件

#tls_private_key = "/usr/local/etc/opensips/tls/user/"

#tls_ca_list = "/usr/local/etc/opensips/tls/user/"

port=5060 #

监听端口,一般不用改

******************

/* uncomment and configure the following line if you want opensips to

bind on a specific interface/port/proto (default bind on all available) */

#listen=udp:192.168.1.2:5060

####### 模块 (Modules Section

######## 包含了外部库的列表,这些外部库是核心所没有的但却是能够展现其功能的。模####

#####块的加载使用loadmodule

#set module path

mpath="/usr/local/lib/opensips/modules/" #

模块搜索路径

/* uncomment next line for MySQL DB support */

#loadmodule "db_"

loadmodule ""

loadmodule ""

loadmodule ""

loadmodule ""

loadmodule ""

loadmodule ""

loadmodule ""

loadmodule ""

loadmodule "mi_"

loadmodule ""

loadmodule ""

loadmodule ""

/* uncomment next lines for MySQL based authentication support

NOTE: a DB (like db_mysql) module must be also loaded */

#loadmodule ""

#loadmodule "auth_" #AUTH_DB

模块是以数据库为基础的认证模块

/* uncomment next line for aliases support

NOTE: a DB (like db_mysql) module must be also loaded */

#loadmodule "alias_"

/* uncomment next line for multi-domain support

NOTE: a DB (like db_mysql) module must be also loaded

NOTE: be sure and enable multi-domain support in all used modules

(see "multi-module params" section ) */

#loadmodule ""

/* uncomment the next two lines for presence server support

NOTE: a DB (like db_mysql) module must be also loaded */

2