Dear all,
this is my first time to compile openser. When i make some configuration in openser.cfg i
have an error. The error comes when i type openser in command line to run my
configuration.
This is the error message:
ERROR: bad config file (2 errors)
0(4161) DEBUG: tm_shutdown : start
0(4161) DEBUG: tm_shutdown : emptying hash table
0(4161) DEBUG: tm_shutdown : releasing timers
0(4161) DEBUG: tm_shutdown : removing semaphores
0(4161) DEBUG: tm_shutdown : destroying tmcb lists
0(4161) DEBUG: tm_shutdown : done
0(4161) shm_mem_destroy
Can any body give me a suggestion what should i do?Please...
This the list openser.cfg that i have made:
# ----------- global configuration parameters ------------------------
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)
#listen=192.168.1.1
port=5060
children=4
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
fifo="/tmp/openser_fifo"
fifo_db_url="mysql://openser:openserrw@localhost/openser"
#
# uncomment the following lines for TLS support
#disable_tls = 0
#listen = tls:your_IP:5061
#tls_verify = 1
#tls_require_certificate = 0
#tls_method = TLSv1
#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"
#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"
#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
loadmodule "/usr/local/lib/openser/modules/uri.so"
loadmodule "/usr/local/lib/openser/modules/uri_db.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/lib/openser/modules/avpops.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
loadmodule "/usr/local/lib/openser/modules/permissions.so"
# ----------------- setting module-specific parameters ---------------
modparam("auth_db|permissions|uri_db|usrloc", "db_url",
"mysql://openser:openserrw@localhost/openser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy", "natping_interval", 30)
modparam("mediaproxy", "mediaproxy_socket",
"/var/run/proxydispatcher.sock")
modparam("mediaproxy", "sip_asymmetrics",
"/etc/openser/sip-asymmetrics-clients")
modparam("mediaproxy", "rtp_asymmetrics",
"/etc/openser/rtp-asymmetrics-clients")
modparam("usrloc", "db_mode", 2)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
modparam("tm", "fr_inv_timer", 27)
modparam("tm", "fr_inv_timer_avp", "s:inv_timeout")
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
modparam("avpops", "avp_url",
"mysql://openser:openserrw@localhost/openser")
modparam("avpops", "avp_table", "usr_preferences")
# ------------------------- request routing logic -------------------
# main routing logic
route {
#-----------------------------------------------------------------------
# sanity check section
#-----------------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
return;
};
if (msg:len >= max_len) {
sl_send_reply("513", "Message too big");
return;
};
#-----------------------------------------------------------------------
# Record Route Section
#-----------------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
record_route_preset("192.168.1.1:5060;nat=yes");
} else if (method!="REGISTER")
{ record_route();
};
#----------------------------------------------------------------------
# Call tear Down Section
#----------------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
#----------------------------------------------------------------------
# Loose Route Section
#----------------------------------------------------------------------
if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (client_nat_test("3") || search("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
return;
};
#----------------------------------------------------------------------
#Call type Processing section
#----------------------------------------------------------------------
if (!is_uri_host_local()) {
if (is_from_local() || allow_trusted()) {
route(4);
route(1);
}
else {
sl_send_reply("403", "Forbidden");
};
return;
};
if (method=="CANCEL") {
route(1);
return;
}
else if (method=="INVITE") {
route(3);
return;
}
else if (method=="REGISTER") {
route(2);
return;
};
if (!lookup("location")) {
sl_send_reply("404", "User not Found");
return;
};
route(1);
}
route[1] {
#-------------------------------------------------------------------
# Default Message Handler
#-------------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
route[2] {
#---------------------------------------------------------------------
# Register Message Handler
#---------------------------------------------------------------------
sl_send_reply("100", "Trying");
if (!search ("^Contact:\ +\*") && client_nat_test("7")) {
setflag(6);
fix_nated_register();
force_rport();
};
if (!www_authorize("pcr.ac.id", "subscriber")) {
www_challenge("pcr.ac.id","0");
return;
};
if (!check_to()) {
sl_send_reply("401", "Unautorized");
return;
};
consume_credentials();
if(!save("location")) {
sl_reply_error();
};
}
route[3] {
#----------------------------------------------------------------------
# INVITE Message Handler
#----------------------------------------------------------------------
if (!allow_trusted()) {
if (!proxy_autorize("","subscriber")) {
proxy_challenge("","0");
return;
} else if (!check_from()) {
sl_send_reply("403","Use From=ID");
return;
};
consume_credentials();
};
if(client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
loolup("aliases");
if (uri!=myself) {
route(4);
route(1);
return;
};
if (uri=~"^sip:00[0-9]*@") {
log (1, "entered 00 condition");
strip(2);
route(4);
route(5);
return;
};
if (avp_db_load ("$ruri/username", "$avp(s:callfwd)")) {
setflag(22);
avp_pushto("$ruri", "$avp(s:callfwd)");
route(6);
return;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
return;
};
if (avp_db_load("$ruri/username", "$avp(s:fwdbusy)")) {
if (!avp_check("$avp(s:fwdbusy)", "eq/$ruri/i")) {
setflag(26);
};
};
if (avp_db_load("$ruri/username", "$avp(s:fwdnoanswer)")) {
if (!avp_check("$avp(s:fwdnoanswer)", "eq/$ruri/i")) {
setflag(27);
};
};
t_on_failure("1");
route(4);
route(1);
}
route[4] {
#--------------------------------------------------------------------
# NAT Tranversal Handler
#--------------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
if (!isflagset(8)) {
setflag(8);
use_media_proxy();
};
};
}
route[5] {
#---------------------------------------------------------------------
# PSTN Handler
#---------------------------------------------------------------------
log (1, "entered pstn route");
rewritehost("192.168.1.1");
avp_write ("$avp(i:45)", "$avp(s:inv_timeout)");
t_on_failure("1");
route(4);
route(1);
}
route[6] {
#-----------------------------------------------------------------------
# Call Forwarding Reply Route Handler
#-----------------------------------------------------------------------
lookup("aliases");
if (!isflagset(22)) {
append_branch();
};
if (uri!=myself) {
route(4);
route(1);
return;
};
if (uri=~"^sip:00[0-9]*@") {
strip(2);
route(4);
route(5);
return;
};
if(!lookup("location")) {
sl_send_reply("404", "User Not Found");
};
route(4);
route(1);
}
onreply_route[1] {
if ((isflagset(6) || isflagset(7)) &&
(status=~"(180)|(183)|2[0-9][0-9]")) {
if(!search("^Content-Length:\ +0")) {
use_media_proxy();
};
};
if(client_nat_test("1")) {
fix_nated_contact();
};
}
failure_route[1] {
if(t_check_status("487")) {
return;
};
if(isflagset(26) && t_check_status("486")) {
if(avp_pushto("$ruri", "$avp(s:fwdbusy)")) {
avp_delete("$avp(s:fwdbusy)");
resetflag(26);
route(6);
};
};
if(isflagset(27) && t_check_status("408")) {
if(avp_pushto("$ruri", "$avp(s:fwdnoanswer)")) {
log(1, "db loaded for no answer");
avp_delete("$avp(s:fwdnoanswer)");
resetflag(27);
route(6);
return;
};
};
end_media_session();
}
Thank u,
Regards
Aldi
---------------------------------
Want to be your own boss? Learn how on Yahoo! Small Business.