<div dir="ltr"><div><div><div>Hi list<br><br></div>i'm config  SQLOps Module with postgresql db module or is postgresql driver?<br><br></div>this is my kamailio config:<br><br>#!ifndef DBURL<br>#!define DBURL "postgres://user:ouser@x.x.x.x/kamailio"<br>
#!endif<br><br><br>sql_query("ca", "select * from  xxxxx","ra");<br><br><br>if($dbr(ra=>rows)> 0){<br>xlog("L_INFO", "saldo:$dbr(ra=>[0,0]) y seg:$dbr(ra=>[0,1]) ");<br>
<br>$var(credit) = $dbr(ra=>[0,0]); # 30$ of credit<br>$var(cost_per_sec) = $dbr(ra=>[0,1]); # 1$ per sec<br>$var(i_pulse) = "1"; # 1$ to establish the call<br>$var(f_pulse) = "1"; # 1$ per second<br>
<br>sql_result_free ("ra");<br><br><br><br><br>if($var(cost_per_sec) > $var(credit)) {<br>                sl_send_reply("402","payment required");<br>                exit;<br>        }<br>
<br>}<br><br><br></div>i got this warning and would like why this happen:<br><br><br>WARNING: db_postgres [km_dbase.c:235]: db_postgres_submit_query(): postgres result check failed with code 7 (PGRES_FATAL_ERROR)<br><br> 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]<br>
<br> 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]<br><br></div>