public void writeTODB(String CallingPeerAddress, String CalledPeerAddress,
            String SetupTime, String STMS, String ConnectTime, String CTMS,
            String DisconnectTime, String DTMS, boolean IsMissed, int TypeAppel) throws Exception {
        try {
            // this will load the MySQL driver, each DB has its own driver
            Class.forName("com.mysql.jdbc.Driver");
            // setup the connection with the DB.    
            connect = DriverManager.getConnection("jdbc:mysql://localhost/cdr_data?user=root&password=root");
            // preparedStatements can use variables and are more efficient
            
                preparedStatement = connect.prepareStatement("insert into  cdr_inbound "
                        + "(CallingPeerAddress,CalledPeerAddress,SetupTime,STMS,ConnectTime,"
                        + "CTMS,DisconnectTime,DTMS,IsMissed,DateAdded,TypeAppel) values (?, ?, ?, ?, ? ,? ,? ,?, ?, ?, ?)");
                //"myuser, webpage, datum, summary, COMMENTS from FEEDBACK.COMMENTS");
                // parameters start with 1
                preparedStatement.setString(1, CallingPeerAddress);
                preparedStatement.setString(2, CalledPeerAddress);
                SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss");
                java.util.Date dateSTMS = sdf.parse(SetupTime);
                java.sql.Timestamp  tstmp = new java.sql.Timestamp(dateSTMS.getTime());
                preparedStatement.setTimestamp(3, tstmp);
                preparedStatement.setInt(4, Integer.valueOf(STMS));
                java.util.Date dateCTMS = sdf.parse(ConnectTime);
                java.sql.Timestamp  tCtmp = new java.sql.Timestamp(dateCTMS.getTime());
                preparedStatement.setTimestamp(5, tCtmp);
                preparedStatement.setInt(6, Integer.valueOf(CTMS));
                java.util.Date dateDTMS = sdf.parse(DisconnectTime);
                java.sql.Timestamp  tDtmp = new java.sql.Timestamp(dateDTMS.getTime());
                preparedStatement.setTimestamp(7, tDtmp);
                preparedStatement.setInt(8, Integer.valueOf(DTMS));
                preparedStatement.setBoolean(9, IsMissed);
                long timeNow = Calendar.getInstance().getTimeInMillis();
                java.sql.Timestamp ts = new java.sql.Timestamp(timeNow);
                preparedStatement.setTimestamp(10, ts);
                preparedStatement.setInt(11, TypeAppel);
                preparedStatement.executeUpdate();
        } catch (SQLException e) {
            Logger.getLogger(SyslogServer.class.getName()).log(Level.SEVERE, null, e);
        } 
    }