Changeset 1006

Show
Ignore:
Timestamp:
09/14/08 18:13:03 (1 year ago)
Author:
areski
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/addons/divers-script/generate-cdr.php

    r1003 r1006  
    1212 *  
    1313****************************************************************************/ 
    14 exit(); 
     14//exit(); 
    1515// CHECK ALL AND ENSURE IT WORKS / NOT URGENT 
    1616 
     
    6060 
    6161 
    62 $A2B -> DBHandle -> Execute('SET AUTOCOMMIT=0'); 
     62$A2B -> DBHandle -> Execute('SET AUTOCOMMIT=1'); 
    6363 
    6464$c_qry_header = "INSERT INTO cc_call ( sessionid, uniqueid,  starttime, stoptime, sessiontime, calledstation, startdelay, " . 
     
    8787                 
    8888                $c_qry_value = " ( 'IAX2/areskiax-3', '$uniqueid', '$startdate_toinsert', '$enddate_toinsert', $sessiontime, " . 
    89                                 "'$calledstation', 2, NULL, 'ANSWER',   1.2000, '$destination', 1,  '1856254697', 0.40000, 0) \n"; 
     89                                "'$calledstation', 2, NULL, 1,   1.2000, '$destination', 1,  '1856254697', 0.40000, 0) \n"; 
    9090                 
    9191                if (strlen($qry)==0) { 
    92                         $qry = $c_qry_header.$c_qry_value;              
     92                        $qry = $c_qry_header.$c_qry_value; 
    9393                } else { 
    9494                        $qry .= ' , '.$c_qry_value; 
     
    110110} 
    111111 
    112  
     112if (strlen($qry)>0) { 
     113        echo "CDR No=$nb_cdr --> $qry\n"; 
     114        $A2B -> DBHandle -> Execute('BEGIN;'); 
     115        $instance_table -> SQLExec ($A2B -> DBHandle, $qry); 
     116        $A2B -> DBHandle -> Execute('COMMIT;'); 
     117
    113118 
    114119if ($verbose) 



Google