启动opensips时报下列错误
[root@OpenSIPS opensips]# opensipsctl start
INFO: Starting OpenSIPS :
ERROR: PID file /var/run/opensips.pid does not exist -- OpenSIPS start failed
查看日志文件
[root@OpenSIPS opensips]# tail -f /var/log/messages
May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 229, column 12-13: unknown command <t_relay>, missing loadmodule?
May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 233, column 16-17: unknown command <t_check_trans>, missing loadmodule?May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 235, column 21-22: unknown command <is_method>, missing loadmodule?May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 244, column 31-32: unknown command <proxy_authorize>, missing loadmodule?May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 245, column 27-28: unknown command <proxy_challenge>, missing loadmodule?May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 248, column 23-24: unknown command <db_check_from>, missing loadmodule?May 14 15:52:41 OpenSIPS opensips: CRITICAL:core:yyerror: parse error in config file //etc/opensips/opensips.cfg, line 249, column 24-25: unknown command <sl_send_reply>, missing loadmodule?
解决方法:
查看库文件存放的位置
[root@OpenSIPS modules]# pwd
/lib64/opensips/modules[root@OpenSIPS modules]# lsacc.so dialog.so mi_fifo.so signaling.soalias_db.so dispatcher.so mi_http.so sipcapture.soauth_aaa.so diversion.so mi_json.so sipmsgops.soauth_db.so dns_cache.so msilo.so siptrace.soauth_diameter.so domainpolicy.so nathelper.so sl.soauth.so domain.so nat_traversal.so sms.soavpops.so drouting.so options.so speeddial.sob2b_entities.so enum.so path.so sst.sob2b_sca.so event_datagram.so pdt.so statistics.sobenchmark.so event_route.so peering.so stun.socachedb_local.so event_xmlrpc.so permissions.so textops.socachedb_sql.so exec.so pike.so tm.socall_center.so gflags.so presence_callinfo.so uac_auth.socall_control.so group.so presence_xcapdiff.so uac_redirect.socfgutils.so imc.so qos.so uac_registrant.socloseddial.so load_balancer.so ratelimit.so uac.sodb_cachedb.so mangler.so registrar.so uri.sodb_flatstore.so mathops.so rr.so userblacklist.sodb_mysql.so maxfwd.so rtpproxy.so usrloc.sodb_text.so mediaproxy.so script_helper.sodb_virtual.so mi_datagram.so seas.so修改配置文件
[root@OpenSIPS opensips]# vim opensips.cfg
####### Modules Section ########
#set module path
mpath="/lib64/opensips/modules/"其实这里面主要的是查看日志信息,根据日志信息进行排误