Hi list
i'm config SQLOps Module with postgresql db module or is postgresql driver?
this is my kamailio config:
#!ifndef DBURL #!define DBURL "postgres://user:ouser@x.x.x.x/kamailio" #!endif
sql_query("ca", "select * from xxxxx","ra");
if($dbr(ra=>rows)> 0){ xlog("L_INFO", "saldo:$dbr(ra=>[0,0]) y seg:$dbr(ra=>[0,1]) ");
$var(credit) = $dbr(ra=>[0,0]); # 30$ of credit $var(cost_per_sec) = $dbr(ra=>[0,1]); # 1$ per sec $var(i_pulse) = "1"; # 1$ to establish the call $var(f_pulse) = "1"; # 1$ per second
sql_result_free ("ra");
if($var(cost_per_sec) > $var(credit)) { sl_send_reply("402","payment required"); exit; }
}
i got this warning and would like why this happen:
WARNING: db_postgres [km_dbase.c:235]: db_postgres_submit_query(): postgres result check failed with code 7 (PGRES_FATAL_ERROR)
WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 0, error [SSL SYSCALL error: Connection timed out#012]
WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 1, error [SSL SYSCALL error: EOF detected#012]
Hello,
the log messages indicate that the connection to postgres module has timeout. Be sure postres server is up and running.
Cheers, Daniel
On 10/07/14 00:17, Rene Montilva wrote:
Hi list
i'm config SQLOps Module with postgresql db module or is postgresql driver?
this is my kamailio config:
#!ifndef DBURL #!define DBURL "postgres://user:ouser@x.x.x.x/kamailio" #!endif
sql_query("ca", "select * from xxxxx","ra");
if($dbr(ra=>rows)> 0){ xlog("L_INFO", "saldo:$dbr(ra=>[0,0]) y seg:$dbr(ra=>[0,1]) ");
$var(credit) = $dbr(ra=>[0,0]); # 30$ of credit $var(cost_per_sec) = $dbr(ra=>[0,1]); # 1$ per sec $var(i_pulse) = "1"; # 1$ to establish the call $var(f_pulse) = "1"; # 1$ per second
sql_result_free ("ra");
if($var(cost_per_sec) > $var(credit)) { sl_send_reply("402","payment required"); exit; }
}
i got this warning and would like why this happen:
WARNING: db_postgres [km_dbase.c:235]: db_postgres_submit_query(): postgres result check failed with code 7 (PGRES_FATAL_ERROR)
WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 0, error [SSL SYSCALL error: Connection timed out#012]
WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 1, error [SSL SYSCALL error: EOF detected#012]
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users