亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 服務器 > Web服務器 > 正文

關于opensips用戶認證配置文件 opensips.cfg 使用介紹

2024-09-01 13:44:53
字體:
來源:轉載
供稿:網友

opensips用戶認證配置文件-opensips.cfg opensips.cfg配置文件,紅色標記的為添加修改的部分,親自測試!

#
# $Id: opensips.cfg 9742 2013-02-05 10:24:48Z vladut-paiu $
#
# OpenSIPS residential configuration script
#by OpenSIPS Solutions <team@opensips-solutions.com>
#
# This script was generated via "make menuconfig", from
# the "Residential" scenario.
# You can enable / disable more features / functionalities by
# re-generating the scenario with different options.#
#
# Please refer to the Core CookBook at:
#
# 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:192.168.139.121:5060 # CUSTOMIZE ME


disable_tcp=yes

#disable_tls=yes


####### Modules Section ########

#set module path
mpath="http://lib/opensips/modules/"

#### MySQL
loadmodule "db_mysql.so"


#### SIGNALING module
loadmodule "signaling.so"

#### StateLess module
loadmodule "sl.so"

#### Transaction Module
loadmodule "tm.so"
modparam("tm", "fr_timer", 5)
modparam("tm", "fr_inv_timer", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

#### Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)

#### MAX ForWarD module
loadmodule "maxfwd.so"

#### SIP MSG OPerationS module
loadmodule "sipmsgops.so"

#### FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)

#### URI module
loadmodule "uri.so"
modparam("uri", "use_uri_table", 0)

#### USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("usrloc", "db_mode", 2)

#### REGISTRAR module
loadmodule "registrar.so"
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")

/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam("registrar", "max_contacts", 10)

#### ACCounting module
loadmodule "acc.so"
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 0)
/* by default we do not adjust the direct of the sequential requests.
if you enable this parameter, be sure the enable "append_fromtag"
in "rr" module */
modparam("acc", "detect_direction", 0)
modparam("acc", "failed_transaction_flag", "ACC_FAILED")
/* account triggers (flags) */
modparam("acc", "log_flag", "ACC_DO")
modparam("acc", "log_missed_flag", "ACC_MISSED")

#### Auth support
loadmodule "auth.so"
loadmodule "auth_db.so"
modparam("auth", "calculate_ha1", yes)
modparam("auth_db", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("auth_db", "password_column", "password")

####### Routing Logic ########

# main request routing logic

route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}

if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(ACC_DO); # do accounting ...
setflag(ACC_FAILED); # ... even if the transaction fails
} else if (is_method("INVITE")) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
}

# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(relay);
} else {
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK; must be an ACK after
# a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ->
# ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}

# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}

t_check_trans();

if ( !(is_method("REGISTER") ) ) {
if (from_uri==myself)
{
} else {
# if caller is not local, then called number must be local
if (!uri==myself) {
send_reply("403","Rely forbidden");
exit;
}
}
}

# preloaded route checking
if (loose_route()) {
xlog("L_ERR",
"Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");
if (!is_method("ACK"))
sl_send_reply("403","Preload Route denied");
exit;
}

# record routing
if (!is_method("REGISTER|MESSAGE"))
record_route();

# account only INVITEs
if (is_method("INVITE")) {
setflag(ACC_DO); # do accounting
}


if (!uri==myself) {
append_hf("P-hint: outbound/r/n");
route(relay);
}

# requests for my domain
if (is_method("PUBLISH|SUBSCRIBE"))
{
sl_send_reply("503", "Service Unavailable");
exit;
}

if (is_method("REGISTER"))
{
#auth user using mysql DB
if (!www_authorize("192.168.139.121", "subscriber")) {
www_challenge("192.168.139.121", "0");
exit;
}
#end auth user

if ( 0 ) setflag(TCP_PERSISTENT);

if (!save("location"))
sl_reply_error();

exit;
}

if ($rU==NULL) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}

# do lookup with method filtering
if (!lookup("location","m")) {
t_newtran();
t_reply("404", "Not Found");
exit;
}

# when routing via usrloc, log the missed calls also
setflag(ACC_MISSED);
route(relay);
}


route[relay] {
# for INVITEs enable some additional helper routes
if (is_method("INVITE")) {
t_on_branch("per_branch_ops");
t_on_reply("handle_nat");
#t_on_reply();
t_on_failure("missed_call");
}

if (!t_relay()) {
send_reply("500","Internal Error");
};
exit;
}


branch_route[per_branch_ops] {
xlog("new branch at $ru/n");
}


onreply_route[handle_nat] {

xlog("incoming reply/n");
}


failure_route[missed_call] {
if (t_was_cancelled()) {
exit;
}

# uncomment the following lines if you want to block client
# redirect based on 3xx replies.
##if (t_check_status("3[0-9][0-9]")) {
##t_reply("404","Not found");
## exit;
##}

}

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
久久国产精品电影| 久久久国产在线视频| 久久精品视频导航| 欧亚精品中文字幕| 国产精品免费久久久久影院| 久久久久国产一区二区三区| 日本免费一区二区三区视频观看| 成人国产亚洲精品a区天堂华泰| 黄色成人在线免费| 亚洲成人黄色在线观看| 久久人人97超碰精品888| 久久九九免费视频| 欧美日韩精品在线| 精品国产乱码久久久久久天美| 51午夜精品视频| 欧美激情伊人电影| 欧美一区三区三区高中清蜜桃| 精品国产乱码久久久久酒店| 欧美国产高跟鞋裸体秀xxxhd| 日韩成人在线视频网站| 91精品成人久久| 在线播放亚洲激情| 国产亚洲精品久久久优势| 成人黄色在线免费| 国产精品av电影| 555www成人网| 91在线观看免费高清| 国产精品国产亚洲伊人久久| 成人a免费视频| www.99久久热国产日韩欧美.com| 成人国产精品久久久久久亚洲| 日韩大胆人体377p| 亚洲bt天天射| 日韩电影中文字幕在线| 精品日韩视频在线观看| 成人激情视频在线播放| 视频在线一区二区| 国产成人在线视频| 久久伊人色综合| 亚洲精品资源美女情侣酒店| 庆余年2免费日韩剧观看大牛| 亚洲精品98久久久久久中文字幕| 午夜精品久久17c| 国产视频精品免费播放| 日韩a**中文字幕| 欧美自拍视频在线| 国产精品日韩久久久久| 欧美影院成年免费版| 91精品国产九九九久久久亚洲| 亚洲精品网站在线播放gif| 国产精品第一页在线| 亚洲区在线播放| 欧美有码在线观看视频| 亚洲成人精品av| 日韩专区在线观看| 91天堂在线观看| 亚洲a成v人在线观看| 成人精品视频99在线观看免费| 精品亚洲夜色av98在线观看| 日本精品视频在线播放| 久久国产精品免费视频| 国产精品a久久久久久| 91精品美女在线| 日韩视频免费中文字幕| 91精品国产91久久久| 大胆欧美人体视频| 精品成人乱色一区二区| 日韩黄色高清视频| 精品欧美激情精品一区| 在线视频国产日韩| 国产精品视频大全| 国产成人综合精品在线| 日韩中文在线视频| 精品久久香蕉国产线看观看gif| 精品毛片三在线观看| 国产999视频| 红桃视频成人在线观看| 久久伊人91精品综合网站| 精品在线观看国产| 91精品国产综合久久久久久久久| 日本欧美在线视频| 亚洲第一福利网站| 日韩视频在线免费| 日韩视频一区在线| 午夜精品一区二区三区av| 欧美高清无遮挡| 久久久999精品视频| 欧美午夜视频一区二区| 欧美高清电影在线看| 最新国产精品拍自在线播放| 国产一区玩具在线观看| 久久久久亚洲精品成人网小说| 欧美精品性视频| 91国产视频在线| 国产三级精品网站| 久久九九亚洲综合| 国产精品高潮呻吟久久av黑人| 高清欧美性猛交xxxx黑人猛交| 欧美色xxxx| xx视频.9999.com| 亚洲国产精久久久久久久| 亚洲大胆人体av| 亚洲最大福利网| 日韩免费不卡av| 成人免费视频网| 日本欧美爱爱爱| 久久久久中文字幕2018| 在线午夜精品自拍| 日韩精品免费在线视频观看| 久久精品这里热有精品| 日韩欧美在线观看视频| 国产一区二区三区日韩欧美| 欧美疯狂性受xxxxx另类| 庆余年2免费日韩剧观看大牛| 91热精品视频| 欧美视频在线免费看| 在线播放精品一区二区三区| 一本色道久久88综合日韩精品| 欧洲精品毛片网站| 国产精品扒开腿做爽爽爽的视频| 国产精品日韩一区| 最近2019中文字幕第三页视频| 91亚洲精品一区| 91久久久久久久久久| 45www国产精品网站| 中国日韩欧美久久久久久久久| 欧美午夜片欧美片在线观看| …久久精品99久久香蕉国产| 国产精品亚洲片夜色在线| 欧美精品18videosex性欧美| 国产97在线|日韩| 97福利一区二区| 亚洲一区中文字幕在线观看| 97人洗澡人人免费公开视频碰碰碰| 成人a级免费视频| 精品中文字幕在线2019| 久久久视频免费观看| 亚洲欧美成人在线| 日韩av影视综合网| 1769国内精品视频在线播放| 精品中文字幕在线观看| 懂色av一区二区三区| 国产精品男人爽免费视频1| 91精品国产乱码久久久久久久久| 亚洲色图五月天| 日韩在线精品一区| 亚洲免费精彩视频| 久久九九亚洲综合| 国产一区二区在线免费| 欧美极品欧美精品欧美视频| 久久久国产成人精品| 欧美www视频在线观看| 伊人久久大香线蕉av一区二区| 在线视频日本亚洲性| 欧美激情中文字幕乱码免费| 性欧美激情精品| 国产日韩在线免费| 亚洲精品成人久久久| 久久久亚洲影院你懂的| 亚洲第一福利网站| 色综久久综合桃花网| 成人性生交xxxxx网站| 久久精品一本久久99精品| 日韩av最新在线观看|