Upgrade 3CX to v18 and get it hosted free!

ASTCCDB

Author image

This is the explanation of the DB problem with ASTCC and CDRs.

CDRs in Ast-cc do not work. Below you will see why this does not function properly.

In astcc.agi:

sub savecdr():

$dbh->do(“INSERT INTO cdrs (cardnum,callerid,callednum,trunk,disposition,billseconds,billcost,callstart) VALUES (” .
$dbh->quote($cardnum) . “, ” . $dbh->quote($callerid) . “, ” . $dbh->quote($callednum) . “, ” . $dbh->quote($trunk) . “, ” .
$dbh->quote($disposition) . “, ” . $dbh->quote($billseconds) . “, ” . $dbh->quote($billcost) . “, ” . $dbh->quote($callstart) . “)”);

The callstart column does NOT exist in the cdrs database. See referenced code below.

In astcc-admin.cgi:

sub create_db():

Table ‘cdrs’ is created.

sub users_update_db():

Table ‘cdrs’ is created again, this time with the ‘callstart’ column.

In the users_update_db() subroutine, there should be an ALTER TABLE rather than just
creating the table again. The way this is now, it will never create the callstart
column and CDRs will not work until this column is created.

Proposed replacement code for users_update_db() subroutine:

sub users_update_db()
return -1 unless $dbh->do(ALTER TABLE cdrs ADD COLUMN callstart CHAR(24) AFTER billcost);
return 0;
}

I believe this has been fixed in CVS. June 10/2005
rolf(at)rowi.net: Had to add callstart manually even with CVS of June/15 …


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.
Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.