<p dir="ltr">Shalom Shimon u need to make sure that you compiled all needed modules.</p>
<div class="gmail_quote">On Sep 2, 2012 1:03 PM, "Shimon Mishal" <<a href="mailto:shimon.mishal@telrad.com">shimon.mishal@telrad.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I followed your instruction and loaded the missing "sipmsgops" module but now I get different errors:<br>
<br>
Could someone send me the correct config file for 1.8.1<br>
<br>
ERROR: PID file /var/run/opensips/opensips.pid does not exist -- OpenSIPS start failed<br>
[ec2-user@ip-10-128-35-32 opensips]$ sudo tail /var/log/messages<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: CRITICAL:core:yyerror: parse error in config file, line 16, column 13-14: failed to load module<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: ERROR:core:sr_load_module: could not open module <auth.so>: auth.so: cannot open shared object file: No such file or directory<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: CRITICAL:core:yyerror: parse error in config file, line 17, column 13-14: failed to load module<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: ERROR:core:sr_load_module: could not open module <auth_db.so>: auth_db.so: cannot open shared object file: No such file or directory<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: CRITICAL:core:yyerror: parse error in config file, line 18, column 13-14: failed to load module<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: ERROR:core:set_mod_param_regex: no module matching usrloc found#012|<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: CRITICAL:core:yyerror: parse error in config file, line 19, column 20-21: Can't set module parameter<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: CRITICAL:core:yyerror: parse error in config file, line 19, column 21-22: syntax error<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: CRITICAL:core:yyerror: parse error in config file, line 19, column 21-22:<br>
Sep 2 09:50:13 ip-10-128-35-32 opensips: ERROR:core:main: bad config file (6 errors)<br>
<br>
<br>
<br>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
[ec2-user@ip-10-128-35-32 opensips]$ cat opensips.cfg<br>
#<br>
# $Id: opensips.cfg 8758 2012-02-29 11:59:26Z vladut-paiu $<br>
#<br>
# OpenSIPS residential configuration script<br>
# by OpenSIPS Solutions <<a href="mailto:team@opensips-solutions.com">team@opensips-solutions.com</a>><br>
#<br>
# This script was generated via "make menuconfig", from<br>
# the "Residential" scenario.<br>
# You can enable / disable more features / functionalities by<br>
# re-generating the scenario with different options.#<br>
#<br>
# Please refer to the Core CookBook at:<br>
# <a href="http://www.opensips.org/Resources/DocsCookbooks" target="_blank">http://www.opensips.org/Resources/DocsCookbooks</a><br>
# for a explanation of possible statements, functions and parameters.<br>
#<br>
loadmodule "db_mysql.so"<br>
loadmodule "auth.so"<br>
loadmodule "auth_db.so"<br>
modparam("usrloc", "db_mode", 0); #THIS LINE MUST TO BE COMMENTED<br>
<br>
modparam("usrloc", "db_mode", 2)<br>
modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>
<br>
----- auth_db params -----<br>
<br>
/* uncomment the following lines if you want to enable the DB based authentication */<br>
modparam("auth_db", "calculate_ha1", yes)<br>
modparam("auth_db", "password_column", "password")<br>
modparam("auth_db", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>
####### Global Parameters #########<br>
<br>
debug=3<br>
log_stderror=no<br>
log_facility=LOG_LOCAL0<br>
<br>
fork=yes<br>
children=4<br>
<br>
/* uncomment the following lines to enable debugging */<br>
#debug=6<br>
#fork=no<br>
#log_stderror=yes<br>
<br>
/* uncomment the next line to enable the auto temporary blacklisting of<br>
not available destinations (default disabled) */<br>
#disable_dns_blacklist=no<br>
<br>
/* uncomment the next line to enable IPv6 lookup after IPv4 dns<br>
lookup failures (default disabled) */<br>
#dns_try_ipv6=yes<br>
<br>
/* comment the next line to enable the auto discovery of local aliases<br>
based on revers DNS on IPs */<br>
auto_aliases=no<br>
<br>
<br>
listen=udp:<a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a> # CUSTOMIZE ME<br>
<br>
<br>
disable_tcp=yes<br>
<br>
disable_tls=yes<br>
<br>
<br>
####### Modules Section ########<br>
<br>
#set module path<br>
mpath="/usr/local/lib64/opensips/modules/"<br>
<br>
#######sipmsgops_Module#############<br>
loadmodule "sipmsgops"<br>
<br>
<br>
#### SIGNALING module<br>
loadmodule "signaling.so"<br>
<br>
#### StateLess module<br>
loadmodule "sl.so"<br>
<br>
#### Transaction Module<br>
loadmodule "tm.so"<br>
modparam("tm", "fr_timer", 5)<br>
modparam("tm", "fr_inv_timer", 30)<br>
modparam("tm", "restart_fr_on_each_reply", 0)<br>
modparam("tm", "onreply_avp_mode", 1)<br>
<br>
#### Record Route Module<br>
loadmodule "rr.so"<br>
/* do not append from tag to the RR (no need for this script) */<br>
modparam("rr", "append_fromtag", 0)<br>
<br>
#### MAX ForWarD module<br>
loadmodule "maxfwd.so"<br>
<br>
#### SIP MSG OPerationS module<br>
loadmodule "sipmsgops.so"<br>
<br>
#### FIFO Management Interface<br>
loadmodule "mi_fifo.so"<br>
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>
<br>
<br>
#### URI module<br>
loadmodule "uri.so"<br>
modparam("uri", "use_uri_table", 0)<br>
<br>
<br>
<br>
<br>
<br>
<br>
#### USeR LOCation module<br>
loadmodule "usrloc.so"<br>
modparam("usrloc", "nat_bflag", 10)<br>
modparam("usrloc", "db_mode", 0)<br>
<br>
#### REGISTRAR module<br>
loadmodule "registrar.so"<br>
modparam("registrar", "tcp_persistent_flag", 7)<br>
<br>
/* uncomment the next line not to allow more than 10 contacts per AOR */<br>
#modparam("registrar", "max_contacts", 10)<br>
<br>
#### ACCounting module<br>
loadmodule "acc.so"<br>
/* what special events should be accounted ? */<br>
modparam("acc", "early_media", 0)<br>
modparam("acc", "report_cancels", 0)<br>
/* by default we do not adjust the direct of the sequential requests.<br>
if you enable this parameter, be sure the enable "append_fromtag"<br>
in "rr" module */<br>
modparam("acc", "detect_direction", 0)<br>
modparam("acc", "failed_transaction_flag", 3)<br>
/* account triggers (flags) */<br>
modparam("acc", "log_flag", 1)<br>
modparam("acc", "log_missed_flag", 2)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
####### Routing Logic ########<br>
<br>
# main request routing logic<br>
<br>
route{<br>
<br>
<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if (has_totag()) {<br>
# sequential request withing a dialog should<br>
# take the path determined by record-routing<br>
if (loose_route()) {<br>
<br>
if (is_method("BYE")) {<br>
setflag(1); # do accounting ...<br>
setflag(3); # ... even if the transaction fails<br>
} else if (is_method("INVITE")) {<br>
# even if in most of the cases is useless, do RR for<br>
# re-INVITEs alos, as some buggy clients do change route set<br>
# during the dialog.<br>
record_route();<br>
}<br>
<br>
<br>
<br>
# route it out to whatever destination was set by loose_route()<br>
# in $du (destination URI).<br>
route(1);<br>
} else {<br>
<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
# non loose-route, but stateful ACK; must be an ACK after<br>
# a 487 or e.g. 404 from upstream server<br>
t_relay();<br>
exit;<br>
} else {<br>
# ACK without matching transaction -><br>
# ignore and discard<br>
exit;<br>
}<br>
}<br>
sl_send_reply("404","Not here");<br>
}<br>
exit;<br>
}<br>
<br>
# CANCEL processing<br>
if (is_method("CANCEL"))<br>
{<br>
if (t_check_trans())<br>
t_relay();<br>
exit;<br>
}<br>
<br>
t_check_trans();<br>
<br>
if ( !(is_method("REGISTER") ) ) {<br>
<br>
if (from_uri==myself)<br>
<br>
{<br>
<br>
} else {<br>
# if caller is not local, then called number must be local<br>
<br>
if (!uri==myself) {<br>
send_reply("403","Rely forbidden");<br>
exit;<br>
}<br>
}<br>
<br>
}<br>
<br>
# preloaded route checking<br>
if (loose_route()) {<br>
xlog("L_ERR",<br>
"Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");<br>
if (!is_method("ACK"))<br>
sl_send_reply("403","Preload Route denied");<br>
exit;<br>
}<br>
<br>
# record routing<br>
if (!is_method("REGISTER|MESSAGE"))<br>
record_route();<br>
<br>
# account only INVITEs<br>
if (is_method("INVITE")) {<br>
<br>
setflag(1); # do accounting<br>
}<br>
<br>
<br>
if (!uri==myself) {<br>
append_hf("P-hint: outbound\r\n");<br>
<br>
route(1);<br>
}<br>
<br>
# requests for my domain<br>
<br>
if (is_method("PUBLISH|SUBSCRIBE"))<br>
{<br>
sl_send_reply("503", "Service Unavailable");<br>
exit;<br>
}<br>
<br>
if (is_method("REGISTER"))<br>
{<br>
<br>
<br>
if ( 0 ) setflag(7);<br>
<br>
if (!save("location"))<br>
sl_reply_error();<br>
<br>
exit;<br>
}<br>
<br>
if ($rU==NULL) {<br>
# request with no Username in RURI<br>
sl_send_reply("484","Address Incomplete");<br>
exit;<br>
}<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
# do lookup with method filtering<br>
if (!lookup("location","m")) {<br>
<br>
<br>
t_newtran();<br>
t_reply("404", "Not Found");<br>
exit;<br>
}<br>
<br>
<br>
<br>
# when routing via usrloc, log the missed calls also<br>
setflag(2);<br>
route(1);<br>
}<br>
<br>
<br>
route[1] {<br>
# for INVITEs enable some additional helper routes<br>
if (is_method("INVITE")) {<br>
<br>
<br>
<br>
t_on_branch("2");<br>
t_on_reply("2");<br>
t_on_failure("1");<br>
}<br>
<br>
<br>
<br>
if (!t_relay()) {<br>
send_reply("500","Internal Error");<br>
};<br>
exit;<br>
}<br>
<br>
<br>
<br>
<br>
branch_route[2] {<br>
xlog("new branch at $ru\n");<br>
}<br>
<br>
<br>
onreply_route[2] {<br>
<br>
xlog("incoming reply\n");<br>
}<br>
<br>
<br>
failure_route[1] {<br>
if (t_was_cancelled()) {<br>
exit;<br>
}<br>
<br>
# uncomment the following lines if you want to block client<br>
# redirect based on 3xx replies.<br>
##if (t_check_status("3[0-9][0-9]")) {<br>
##t_reply("404","Not found");<br>
## exit;<br>
##}<br>
<br>
<br>
}<br>
<br>
<br>
<br>
[ec2-user@ip-10-128-35-32 opensips]$<br>
<br>
<br>
Regards<br>
<br>
Shimon Mishal<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
************************************************************************************<br>
This footnote confirms that this email message has been scanned by<br>
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.<br>
************************************************************************************<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>