[OpenSIPS-Users] need help on snmp of opensips

haloha haloha201 at gmail.com
Fri Oct 17 17:29:44 CEST 2008


Hi all

could you help me the clue on that
i compiled the module snmpstats successfull, i didnot change the snmpd.conf
but when i start opensips with snmp module i get the error

[root at computer1 ~]# tail -f /var/log/messages
Oct 17 19:13:07 computer1 /sbin/opensips[2028]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:07 computer1 /sbin/opensips[2027]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:07 computer1 /sbin/opensips[2026]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:07 computer1 /sbin/opensips[2024]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:07 computer1 /sbin/opensips[2022]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:07 computer1 /sbin/opensips[2020]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:07 computer1 /sbin/opensips[2046]: INFO:core:sig_usr: signal 15
received
Oct 17 19:13:09 computer1 opensips: ERROR:core:sr_load_module: could not
open module <//lib/opensips/modules/snmpstats.so>:
/usr/lib/libnetsnmpagent.so.10: undefined symbol: boot_DynaLoader
Oct 17 19:13:09 computer1 opensips: CRITICAL:core:yyerror: parse error in
config file, line 44, column 13-14: failed to load module

[root at computer1 ~]# ls /lib/opensips/modules/
acc.so            dispatcher.so    mi_fifo.so        snmpstats.so
alias_db.so       diversion.so     msilo.so          speeddial.so
auth_db.so        domainpolicy.so  nathelper.so      sst.so
auth_diameter.so  domain.so        nat_traversal.so  statistics.so
auth_radius.so    enum.so          options.so        textops.so
auth.so           exec.so          path.so           tm.so
avpops.so         gflags.so        pdt.so            uac_redirect.so
avp_radius.so     group_radius.so  permissions.so    uac.so
benchmark.so      group.so         pike.so           uri_db.so
cfgutils.so       imc.so           ratelimit.so      uri_radius.so
db_flatstore.so   lcr.so           registrar.so      uri.so
db_mysql.so       mangler.so       rr.so             userblacklist.so
db_text.so        maxfwd.so        siptrace.so       usrloc.so
dialog.so         mediaproxy.so    sl.so             xlog.so
dialplan.so       mi_datagram.so   sms.so


the opensips.cfg :

debug=3
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4
port=5060

mpath="//lib/opensips/modules/"
loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
modparam("tm", "fr_timer", 10)
modparam("tm", "fr_inv_timer", 30)/*invite time-out*/
loadmodule "rr.so"
modparam("rr", "enable_full_lr", 1)
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
modparam("usrloc", "timer_interval", 120)    /* delete expired register on
database + memory*/
modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
modparam("usrloc", "db_mode", 2)    /* store database + memory */
loadmodule "registrar.so"
modparam("registrar", "default_expires", 3600)
modparam("registrar", "max_expires",3600)
modparam("registrar", "min_expires",3600)
loadmodule "textops.so"
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
loadmodule "auth.so"
loadmodule "auth_db.so"
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url","mysql://opensips:opensipsrw@localhost
/opensips")
modparam("auth_db", "load_credentials", "")
loadmodule "acc.so"
modparam("acc", "db_flag", 2)
modparam("acc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("acc", "db_extra", "from_uri=$fu; to_uri=$tu")
modparam("acc", "db_table_acc", "acc")
loadmodule "dialog.so"
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
modparam("dialog", "db_mode", 1)
loadmodule "snmpstats.so"


route{
        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","Too Many Hops");
                exit;
        }
        if (msg:len >=  2048 ) {
        sl_send_reply("513", "Message too big");
        exit;
        }
        if (loose_route())
                append_hf("P-hint: rr-enforced\r\n");
        if (is_method("PUBLISH|SUBSCRIBE"))
        {
                sl_send_reply("503", "Service Unavailable");
                exit;
        }
        if (is_method("REGISTER"))
        {
                # authenticate the REGISTER requests (uncomment to enable
auth)
                if(!www_authorize("", "subscriber")){
                      www_challenge("", "0");
                      exit;
                }
                ##if (!check_to())
                ##{
                ##      sl_send_reply("403","Forbidden auth ID");
                ##      exit;
                ##}
                if (!save("location"))
                        sl_reply_error();
                exit;
        }
        if (!lookup("location")) {
                switch ($retcode) {
                        case -1:
                        case -3:
                                t_newtran();
                                t_reply("404", "Not Found");
                                exit;
                        case -2:
                                sl_send_reply("405", "Method Not Allowed");
                                exit;
                }
        }
        if (!method=="REGISTER")
                route(2);
        route(1);
}

route[1] {
    # send it out now; use stateful forwarding as it works reliably
    # even for UDP2TCP
    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}

route[2] {
    if (is_method("INVITE")){
        if (!proxy_authorize("", "subscriber")) {
                      proxy_challenge("", "0");  # Realm will be
autogenerated
                      exit;
        };
    };
    record_route();
}


Thanks
Ha`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081017/8e4e0468/attachment.htm 


More information about the Users mailing list