I must just be missing something really stupid here, but I would appreciated any insight into what I'm doing wrong. We are testing some accounting methods in a lab, and am not seeing anything show up in our DB. Our config is very generic, based on the out of the box template. The module is loaded and configured:<br>
<br># ----- acc params -----<br>modparam("acc", "early_media", 1)<br>modparam("acc", "report_ack", 1)<br>modparam("acc", "report_cancels", 1)<br>modparam("acc", "detect_direction", 0)<br>
modparam("acc", "failed_transaction_flag", 3)<br>modparam("acc", "log_flag", 1)<br>modparam("acc", "log_missed_flag", 2)<br>modparam("acc", "db_flag", 1)<br>
modparam("acc", "db_missed_flag", 2)<br><br>Then in various parts of the script the standard places I would expect to set these flags:<br><br> if (loose_route()) {<br> if (is_method("BYE")) {<br>
setflag(1); # do accounting ...<br> setflag(3); # ... even if the transaction fails<br><br> # account only INVITEs<br> if (is_method("INVITE")) {<br>
setflag(1); # do accounting<br> }<br clear="all"><br> # when routing via usrloc, log the missed calls also<br> setflag(2);<br><br>We are seeing in the log that it would appear the events are getting trigger correctly:<br>
<br>Jun 4 11:49:57 <our_ip> /usr/local/sbin/opensips[25631]: ACC: transaction answered: timestamp=1275677397;method=BYE;from_tag=6c7fc353661f7865;to_tag=3d98b53c7e064932;call_id=<a href="mailto:03cc10af6f6ee332@10.0.0.104">03cc10af6f6ee332@10.0.0.104</a>;code=480;reason=Temporarily Unavailable - Busy<br>
Jun 4 11:49:57 <our_ip> /usr/local/sbin/opensips[25625]: ACC: transaction answered: timestamp=1275677397;method=BYE;from_tag=3d98b53c7e064932;to_tag=6c7fc353661f7865;call_id=<a href="mailto:03cc10af6f6ee332@10.0.0.104">03cc10af6f6ee332@10.0.0.104</a>;code=480;reason=Temporarily Unavailable - Busy<br>
Jun 4 11:57:14 <our_ip> /usr/local/sbin/opensips[25614]: ACC: transaction answered: timestamp=1275677834;method=INVITE;from_tag=0c1f77d0c846e4ce;to_tag=SDtt28c99-3240d2c7+1+979c0001+af41d800;call_id=<a href="mailto:c0fa7dd7df1340e9@192.168.1.110">c0fa7dd7df1340e9@192.168.1.110</a>;code=183;reason=Session Progress<br>
Jun 4 11:57:19 <our_ip> /usr/local/sbin/opensips[25615]: ACC: transaction answered: timestamp=1275677839;method=INVITE;from_tag=0c1f77d0c846e4ce;to_tag=SDtt28c99-3240d2c7+1+979c0001+af41d800;call_id=<a href="mailto:c0fa7dd7df1340e9@192.168.1.110">c0fa7dd7df1340e9@192.168.1.110</a>;code=200;reason=OK<br>
Jun 4 11:57:19 <our_ip> /usr/local/sbin/opensips[25623]: ACC: request acknowledged: timestamp=1275677839;method=ACK;from_tag=0c1f77d0c846e4ce;to_tag=SDtt28c99-3240d2c7+1+979c0001+af41d800;call_id=<a href="mailto:c0fa7dd7df1340e9@192.168.1.110">c0fa7dd7df1340e9@192.168.1.110</a>;code=200;reason=OK<br>
Jun 4 11:57:22 <our_ip> /usr/local/sbin/opensips[25623]: ACC: transaction answered: timestamp=1275677842;method=BYE;from_tag=SDtt28c99-3240d2c7+1+979c0001+af41d800;to_tag=0c1f77d0c846e4ce;call_id=<a href="mailto:c0fa7dd7df1340e9@192.168.1.110">c0fa7dd7df1340e9@192.168.1.110</a>;code=200;reason=OK<br>
Jun 4 12:04:05 <our_ip> /usr/local/sbin/opensips[25616]: ACC: transaction answered: timestamp=1275678245;method=INVITE;from_tag=6456119a0df401a0;to_tag=SDkqeqf99-3240d2c7+1+6730000a+52d11233;call_id=<a href="mailto:6312464ba64113d1@192.168.1.110">6312464ba64113d1@192.168.1.110</a>;code=183;reason=Session Progress<br>
Jun 4 12:04:11 <our_ip> /usr/local/sbin/opensips[25617]: ACC: transaction answered: timestamp=1275678251;method=INVITE;from_tag=6456119a0df401a0;to_tag=SDkqeqf99-3240d2c7+1+6730000a+52d11233;call_id=<a href="mailto:6312464ba64113d1@192.168.1.110">6312464ba64113d1@192.168.1.110</a>;code=200;reason=OK<br>
Jun 4 12:04:11 <our_ip> /usr/local/sbin/opensips[25623]: ACC: request acknowledged: timestamp=1275678251;method=ACK;from_tag=6456119a0df401a0;to_tag=SDkqeqf99-3240d2c7+1+6730000a+52d11233;call_id=<a href="mailto:6312464ba64113d1@192.168.1.110">6312464ba64113d1@192.168.1.110</a>;code=200;reason=OK<br>
Jun 4 12:04:15 <our_ip> /usr/local/sbin/opensips[25615]: ACC: transaction answered: timestamp=1275678255;method=BYE;from_tag=6456119a0df401a0;to_tag=SDkqeqf99-3240d2c7+1+6730000a+52d11233;call_id=<a href="mailto:6312464ba64113d1@192.168.1.110">6312464ba64113d1@192.168.1.110</a>;code=200;reason=OK <br>
<br>But we never see anything in the DB. The default table exists as described by:<br><br>CREATE TABLE `acc` (<br> `id` int(10) unsigned NOT NULL auto_increment,<br> `method` char(16) NOT NULL default '',<br> `from_tag` char(64) NOT NULL default '',<br>
`to_tag` char(64) NOT NULL default '',<br> `callid` char(64) NOT NULL default '',<br> `sip_code` char(3) NOT NULL default '',<br> `sip_reason` char(32) NOT NULL default '',<br> `time` datetime NOT NULL,<br>
PRIMARY KEY (`id`),<br> KEY `callid_idx` (`callid`)<br>) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br><br>Any thoughts on what I'm not seeing to enable this data to go into the DB correctly?<br><br>Thanks<br><br>-dg<br>