我有一个特定的情况,我需要将Kamailio连接到PostgreSQL DB而不是MySQL。有人可以为此提供一步。尝试了论坛的多个步骤,但失败了。
面临的问题:每当kamailio在PostgreSQL中创建数据库时,它就会继续询问密码并最终失败。
Ubuntu版本:16.04 LTS Kamailio:5.0
到目前为止我做了以下事情: 1.包括postgre模块 2.修改了kamailio.cfg并添加了以下行:
#!ifdef WITH_PGSQL
# - database URL - used to connect to database server by modules such
# as: auth_db, acc, usrloc, a.s.o.
#!ifndef DBURL
#!define DBURL "postgres://kamailio:password@localhost/kamailio"
#!endif
#!endif
这是我的文件kambdctlrc:
# The Kamailio configuration file for the control tools.
#
# Here you can set variables used in the kamctl and kamdbctl setup
# scripts. Per default all variables here are commented out, the control tools
# will use their internal default values.
## your SIP domain
SIP_DOMAIN=sip.<DOMAIN>.net
## chrooted directory
# $CHROOT_DIR="/path/to/chrooted/directory"
## database type: MYSQL, PGSQL, ORACLE, DB_BERKELEY, DBTEXT, or SQLITE
# by default none is loaded
#
# If you want to setup a database with kamdbctl, you must at least specify
# this parameter.
DBENGINE=PGSQL
## database host
DBHOST=localhost
## database host
# DBPORT=3306
## database name (for ORACLE this is TNS name)
DBNAME=kamailio
# database path used by dbtext, db_berkeley or sqlite
# DB_PATH="/usr/local/etc/kamailio/dbtext"
## database read/write user
DBRWUSER="kamailio"
## password for database read/write user
DBRWPW="password"
## database read only user
DBROUSER="kamailioro"
提前致谢!!
答案 0 :(得分:0)
最后,我们已经找到了问题,这是.pgpass文件中的一个小错误,它最终导致了身份验证问题。