gpt4 book ai didi

postgresql - 将 Kamailio 与 PostgreSQL 连接起来

转载 作者:行者123 更新时间:2023-11-29 13:45:47 42 4
gpt4 key购买 nike

在特定情况下,我需要将 Kamailio 连接到 PostgreSQL 数据库而不是 MySQL。有人可以为此提供步骤吗?尝试了论坛中的多个步骤,但都失败了。

面临的问题:每当 kamailio 在 PostgreSQL 中创建数据库时,它都会不断询问密码并最终失败。

Ubuntu 版本:16.04 LTS卡麦里奥: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"

提前致谢!!

最佳答案

最后,我们找到了问题所在,这是 .pgpass 文件中的一个小错误,最终导致了身份验证问题。

关于postgresql - 将 Kamailio 与 PostgreSQL 连接起来,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48735686/

42 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com