Thank you<br>
this is what I made to solve it:<br>
<br>
1.- create table 'calls' using: " starttime TIMESTAMP DEFAULT
now() NOT NULL, " (it can be "starttime TIMESTAMP DEFAULT
CURRENT_TIMESTAMP NOT NULL," too) :<br>
<br>
CREATE TABLE calls (<br>
id BIGINT NOT NULL AUTO_INCREMENT,<br>
sessionid CHAR(40) NOT NULL,<br>
uniqueid CHAR(30) NOT NULL,<br>
username CHAR(40) NOT NULL,<br>
nasipaddress CHAR(30),<br>
starttime TIMESTAMP DEFAULT now() NOT NULL,<br>
stoptime TIMESTAMP,<br>
sessiontime INT,<br>
calledstation CHAR(30),<br>
startdelay INT,<br>
stopdelay INT,<br>
terminatecause CHAR(20),<br>
usertariff CHAR(20),<br>
calledprovider CHAR(20),<br>
calledcountry CHAR(30),<br>
calledsub CHAR(20),<br>
calledrate float,<br>
sessionbill float,<br>
destination CHAR(40),<br>
id_tariffgroup INT,<br>
id_tariffplan INT,<br>
id_ratecard INT,<br>
id_trunk INT,<br>
sipiax INT DEFAULT '0',<br>
src CHAR(40),<br>
PRIMARY KEY (id)<br>
);<br>
<br>
<br>
2.- Change value FG_TABLE_NAME="call t1" for FG_TABLE_NAME="calls t1" in following files:<br>
<br>
A2Billing_UI/Public/call-log-customers.php<br>
A2Billing_UI/Public/invoices.php<br>
A2BCustomer_UI/balance.php<br>
A2BCustomer_UI/invoices.php<br>
<br>
<br>
3.- Change value "INSERT INTO call" for "INSERT INTO calls" in following files:<br>
<br>
/var/lib/asterisk/agi-bin/libs_a2billing/db_php_lib/Class.RateEngine.php<br>
/var/lib/asterisk/agi-bin/libs_a2billing/Class.A2Billing.php<br>/wwwroot/A2BCustomer_UI/lib/Class.A2Billing.php<br>
/wwwroot/A2Billing_UI/lib/Class.A2Billing.php<br>
<br>
now it works...<br>
<br>
rafael<br>
<br>
PS: mysql-schema does not work properly in mysql 5.0.x because only one
timestamp with default now() in a table its allowed as you told me and
also I´ve found other issue related to auto_increment value:<br>
<br>
ERROR 1064 (42000) at line 87: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'call (<br>
id BIGINT NOT NULL AUTO_INCREMENT,<br>
sessionid CHAR(40) NOT NULL,<br>
' at line 1<br>
<br>
<br>
<br>
<br>
<br><div><span class="gmail_quote">On 11/13/05, <b class="gmail_sendername">Vahan Yerkanian</b> <<a href="mailto:vahan@arminco.com">vahan@arminco.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Rafael R. GV wrote:<br>> thanks Vahan<br>> you are right, I have changed 'call t1' for 'calls t1' in balance.php<br>> and invoices.php files and then tried to create a new table named<br>> 'calls' but mysql 5 has changed syntax for 'TIMESTAMP DEFAULT' and this
<br>> is the error:<br><br>> -> starttime TIMESTAMP DEFAULT 'now()' NOT NULL,<br><br>this should read<br><br>starttime TIMESTAMP DEFAULT now() NOT NULL<br><br>now() is a builtin MySQL function and doesn't need to be enclosed in 's.
<br>Also, you can have only one timestamp with default now() in a table...<br><br><br>HTH,<br>Vahan<br><br><br></blockquote></div><br><br clear="all"><br>-- <br><br>rrgv