hi list!<br><br>we tried to log accounting of ser on postgres, but it seems that logging was not successful. here are the simulations we did :<br><br>- we convert all the schema of mysql to postgresql databse (ser schema), just minor revision on datatypes since we don't find any
posgresql.sql for ser on the net<br>- followed this steps <a href="http://www.voip-info.org/wiki/view/SER+module+postgres">http://www.voip-info.org/wiki/view/SER+module+postgres</a><br>- recompiled ser to support postgresql database
<br>- tried to configure/run ser.cfg to log accounting but no luck<br>- we did some search and tried it first on mysql database<br> - edit the src of acc module and edit the Makefile to support SQL logging, recompile the
acc.so <br> - copy the new acc.so to /path/of/ser/modules/<br> - add db_flag on ser.cfg<br> - now acc mysql was logging <br>- tried to replace the connector from mysql to postgresql on ser.cfg with the same config<br>
- ngrep port 5432 on localhost but it seems no request came from ser<br> - ser was running ok and we see logs on /var/log/messages that acc was working<br><br>* do we missed something? or probably tweak some configuration?
<br>* below are snippet of my ser.cfg<br><br>thanks and regards<br>emer <br><br>------------------------------------------------------------<br>fifo="/tmp/ser_fifo"<br>fifo_db_url="postgres://ser:heslo-757@localhost
:5432/ser"<br><br># ------------------ module loading ----------------------------------<br><br>loadmodule "/usr/local/lib/ser/modules/tm.so"<br>loadmodule "/usr/local/lib/ser/modules/acc.so"<br>loadmodule "/usr/local/lib/ser/modules/sl.so"
<br>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"<br>loadmodule "/usr/local/lib/ser/modules/rr.so"<br>loadmodule "/usr/local/lib/ser/modules/postgres.so"<br><br># ----------------- setting module-specific parameters ---------------
<br>modparam("usrloc", "db_mode", 0)<br>modparam("auth_db", "calculate_ha1", 1)<br>modparam("auth_db", "password_column", "password")<br>modparam("auth_db","db_url", "
postgres://ser:heslo-757@localhost:5432/ser")<br><br># -- acc params --<br>modparam("acc", "log_level", 1)<br># that is the flag for which we will account -- don't forget to<br># set the same one :-)
<br>modparam("acc", "log_flag", 1 )<br>modparam("acc", "db_flag", 1)<br><br> /* ********* RR ********************************** */<br><br> /* grant Route routing if route headers present */
<br> if (loose_route())<br> {<br> # mark the BYEs -- they are requests within a dialog<br> if(method=="BYE")<br> setflag(1);<br> t_relay();
<br> break;<br> };<br><br> /* record-route INVITEs -- all subsequent requests must visit us */<br> if (method=="INVITE") {<br> setflag(1);<br> record_route();
<br> };<br>----------------------------------------------------------------------------------------------------<br># postges/ser process<br>10199 ? S 0:00 ser -f pstn.ser02<br>10201 ? S 0:00 ser -f
pstn.ser02<br>10205 ? S 0:00 postgres: ser ser 127.0.0.1(56629) idle<br>10203 ? S 0:00 ser -f pstn.ser02<br>10209 ? S 0:00 postgres: ser ser 127.0.0.1(56630) idle<br>10211 ? S 0:00 postgres: ser ser
127.0.0.1(56631) idle<br>10206 ? S 0:00 ser -f pstn.ser02<br><br><br>