Hello to all I enabled the Kamailio acc modules but it isn't writing to "acc" or "missed_calls" table. How can I see in real time the SQL querys that Kamailio is sending to Mysqld? Here are some parts of my configuration file.
(...) loadmodule "db_mysql.so" loadmodule "acc.so"
(...)
# ----- acc params ----- /* what sepcial events should be accounted ? */ modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) /* account triggers (flags) */ modparam("acc", "failed_transaction_flag", 3) modparam("acc", "log_flag", 1) modparam("acc", "log_level", 2) modparam("acc", "log_missed_flag", 2) modparam("acc", "log_extra", "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") /* uncomment the following lines to enable DB accounting also */ modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("domain", "db_url", "mysql://dbusername:dbpass@localhost/openser") modparam("acc", "db_extra","src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
Flags 1 and 2 are in the configuration (the same way as in the sample that comes with Kamailio)
(...)
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails } route(1); (...)
# account only INVITEs if (is_method("INVITE")) { setflag(1); # do accounting }
So, if accounting is enabled and the flags in the right place... why is the "acc" table still empty? Thanks Regards Joao Pereira