Hi Georgy,
I am running kamailio-4.3.7-2.2.x86_64 with postgresql-bdr94-bdr-1.0.7-1.cs7.x86_64 by own forked version on CentOS7.9.
Please refer below kamailio.cfg. #!KAMAILIO
#!enable postgresql #!define WITH_PGSQL ---
#!ifdef WITH_PGSQL # - database URL - used to connect to database server by modules such # as: auth_db, acc, usrloc, a.s.o. #!define DBURL "postgres://PGUSER:PASS@IP:5432/kamailio" #!ifdef WITH_ASTERISK #!define DBASTURL "postgres://PGUSER:PASS@IP:5432/asteriskDB" #!endif #!endif
#!ifdef WITH_PGSQL loadmodule "db_postgres.so" #!endif
#!ifdef WITH_DISPATCHER loadmodule "dispatcher.so" loadmodule "sqlops.so" #!endif
#!ifdef WITH_DISPATCHER # ----- dispatcher params ----- modparam("dispatcher", "db_url", DBURL) modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("sqlops","sqlcon","ca=>postgres://PGUSER:PASS@IP:5432/kamailio") #!endif
*Point kamailio-4.3.7-2 has a bug my guessing, only Port 5432/TCP is working. So, I needed install postgre-libs and sever for run the command. Now Kamailio is running 3 servers.
I am not sure Kamailio 5.5.5 but postgresq14 alomost same. I hope this helps for you.
Regards, Noriyuki.Hayashi Japan
On Thu, 6 Apr 2023 17:30:15 +0200 Paolo Visintin paolo.visintin@evoseed.io wrote:
Hello Georgy, Regarding your Kamailio configuration with PostgreSQL, could you please provide more information about the error that Kamailio is giving when it tries to connect to the database? Knowing the error message would help in identifying the issue.
Il giorno gio 6 apr 2023 alle ore 15:32 georgy.grigoryev@snapcom.fr ha scritto:
Hello everyone,
I'm trying to connect Kamailio 5.5.5 to my PostgreSQL 14. They are on two different servers. I have created the Kamailio DB on the Postgre with the help of the command "kamdbctl create" I'm able to connect to the database with no problem. The problem is in the kamailio.cfg file, i have added this so far:
#!define WITH_PGSQL
#!ifdef WITH_PGSQL #!define DBURL "postgres://USER:PASSWORD@IP:POPT/kamailio" #!endif
#!ifdef WITH_PGSQL loadmodule "db_postgres.so" #!endif
modparam("db_postgres", "retries", 3) modparam("db_postgres", "timeout", 10) modparam("db_postgres", "tcp_keepalive", 600) modparam("db_postgres", "lockset", 6) modparam("db_postgres", "bytea_output_escape", 0)
But my kamailio doenst like this configuration, can someone help me find the problem?
Thank you in advance!
Best Regards! __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
-- *TLC 4.0*: 20 anni di *esperienza* al tuo servizio per sviluppare *soluzioni voce e dati innovative* Paolo Visintin
*evoseed s.r.l.*
phone: +39 346 09 86 641 mail: paolo.visintin@evoseed.io site: evoseed.io address: Via Lucrezio 13, Trieste ItalyFissa https://calendly.com/paolo-visintin-evoseed/30min una call con me
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Telecommunications Association License No. A-18-9191 Government Resell License No. 301039703002 WATS CO.,LTD. Kawana Bldg, 5F Kamata Ota-ku Tokyo, 144-0052 JAPAN Phone 81-50-5830-5940 Ext&Mobile:201 VoiceMailDirect:201*1 FAX 81-50-5830-5941 http://wats.gr.jp Mail: wats @ wats.gr.jp Please remove the space between @ as double side
Key fingerprint = B53D FF2F BFEA FDA8 1439 38AA 8281 9A3E C9B6 2FC9
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/