<DIV>
<DIV>The reason for the problem is clear below, the ASTERISKCDRDB database is being updated instead of the ASTCCDB database which holds the cdrs and BILLCOST.</DIV>
<DIV> </DIV>
<DIV>How can this problem be corrected???</DIV>
<DIV> </DIV>
<DIV>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN style="mso-fareast-font-family: 'MS Mincho'"><FONT face="Courier New">3 Query<SPAN style="mso-spacerun: yes"> </SPAN>UPDATE cards SET used='0' WHERE number='58767059'<BR><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>3 Query<SPAN style="mso-spacerun: yes"> </SPAN>UPDATE cards SET inuse='0' WHERE number='58767059'<BR><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>3 Query<SPAN style="mso-spacerun: yes"> </SPAN>SELECT * FROM cards WHERE number='58767059'<BR><SPAN style="mso-tab-count:
2"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>3 Query<SPAN style="mso-spacerun: yes"> </SPAN>UPDATE cards SET used='0' WHERE number='58767059'<BR><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>3 Query<SPAN style="mso-spacerun: yes"> </SPAN>UPDATE cards SET inuse='0' WHERE number='58767059'<BR><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>3 Quit<SPAN style="mso-spacerun: yes"> </SPAN><BR><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-spacerun:
yes"> </SPAN>4 Connect<SPAN style="mso-spacerun: yes"> </SPAN>asteriskuser@localhost on asteriskcdrdb<BR></FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>4 Query<SPAN style="mso-spacerun: yes"> </SPAN>INSERT INTO cdr </SPAN></P>(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES ('2005-06-29 05:17:42','\"Mike\" <1234>','1234','777','TEST', 'SIP/1234-f285','SIP/213.45.62.117-1732','Dial','SIP/213.45.62.117/19315461298|30|HL(600000000:60000:30000)',42,42,'ANSWERED',3,'')<BR><BR><BR><BR><B><I>Juan Luis Moyano
<juanmoyano@southecon.com.ar></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Bernard Cresencia wrote:<BR>> sorry, I meant my.cnf, not my.conf.<BR>><BR>> Once logging is enabled, I would do tail -f<BR>> /var/log/myslqd.log and watch as the database is being<BR>> accessed during a call.<BR><BR><BR>I've done what Bernard suggested and this is my output from mysql.log on<BR>a successful call to number 612 on FWD. I'd like to know if any of you<BR>see something wrong or rare. Thanks a lot.<BR><BR>Time Id Command Argument<BR>050629 1:02:02 1 Connect root@localhost on astcc<BR>050629 1:02:04 1 Query SELECT * FROM cards WHERE number='21'<BR>1 Query SELECT * FROM cards WHERE number='21'<BR>1 Query SELECT * FROM cards WHERE number='21'<BR>1 Query SELECT * FROM cards WHERE number='21'<BR>1 Query UPDATE cards SET used='1801' WHERE<BR>number='21'<BR>1 Query UPDATE cards SET inuse='1' WHERE<BR>number='21'<BR>050629 1:02:10 1 Query SELECT * FROM routes WHERE
'612'<BR>RLIKE pattern ORDER BY LENGTH(pattern) DESC<BR>050629 1:02:25 1 Query SELECT * FROM cards WHERE number='21'<BR>1 Query SELECT * FROM trunks WHERE name='FWD'<BR>050629 1:02:37 1 Query INSERT INTO cdrs<BR>(cardnum,callerid,callednum,trunk,disposition,billseconds,billcost,callstart)<BR>VALUES ('21', '\"Coco\" <21>', '612', 'FWD', 'ANSWER', '9', '150', 'Wed<BR>Jun 29 01:02:37 2005')<BR>1 Query UPDATE cards SET used='1951' WHERE<BR>number='21'<BR>1 Query UPDATE cards SET inuse='0' WHERE<BR>number='21'<BR>1 Query SELECT * FROM cards WHERE number='21'<BR>1 Query UPDATE cards SET used='1951' WHERE<BR>number='21'<BR>1 Query UPDATE cards SET inuse='0' WHERE<BR>number='21'<BR>1 Quit<BR><BR>-- <BR>Juan Luis Moyano<BR>juanmoyano@southecon.com.ar<BR><BR>_______________________________________________<BR>Asterisk-Users mailing list<BR>Asterisk-Users@lists.digium.com<BR>http://lists.digium.com/mailman/listinfo/asterisk-users<BR>To UNSUBSCRIBE or update options
visit:<BR>http://lists.digium.com/mailman/listinfo/asterisk-users<BR></BLOCKQUOTE></DIV><p>
                <hr size=1><font face="Arial" size="2">How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. <a href="http://us.rd.yahoo.com/mail/uk/taglines/default/photos/*http://uk.photos.yahoo.com/"><b>Get Yahoo!
Photos</b></a></font>