$action = "update";
     //Filter phone number holded and stoped
     if ($result_search_phonestatus[0][0] == 1 || $result_search_phonestatus[0][0] == 2) {
         continue;
     }
     if ($result_search_phonestatus[0][1] == 0) {
         if ($verbose_level >= 1) {
             echo "\n[  Can't send callback -> number {$phone['1']} is not in the frequency ]";
         }
         continue;
     }
 } else {
     $action = "insert";
 }
 // Search Road...
 $A2B->set_instance_table($instance_table);
 $A2B->cardnumber = $phone["username"];
 $error_msg = '';
 if ($A2B->callingcard_ivr_authenticate_light($error_msg)) {
     $RateEngine = new RateEngine();
     $RateEngine->webui = 0;
     // LOOKUP RATE : FIND A RATE FOR THIS DESTINATION
     $A2B->agiconfig['accountcode'] = $phone["username"];
     $A2B->agiconfig['use_dnid'] = 1;
     $A2B->agiconfig['say_timetocall'] = 0;
     $A2B->dnid = $A2B->destination = $phone["number"];
     $resfindrate = $RateEngine->rate_engine_findrates($A2B, $phone["number"], $phone["tariff"]);
     // IF FIND RATE
     if ($resfindrate != 0) {
         $res_all_calcultimeout = $RateEngine->rate_engine_all_calcultimeout($A2B, $A2B->credit);
         if ($res_all_calcultimeout) {
예제 #2
0
* @version    CVS: $Id:$
* @since      File available since Release 1.4
*
*/
include_once dirname(__FILE__) . "/lib/Class.Table.php";
include dirname(__FILE__) . "/lib/Class.A2Billing.php";
include dirname(__FILE__) . "/lib/Misc.php";
include dirname(__FILE__) . "/lib/interface/constants.php";
$instance_table = new Table();
$idconfig = 1;
$mode = 'standard';
$A2B = new A2Billing();
$A2B->load_conf($agi, NULL, 0, $idconfig);
$A2B->mode = $mode;
$global_instance_table = new Table();
$A2B->set_instance_table($global_instance_table);
$instance_table = new Table();
if (!$A2B->DbConnect()) {
    exit;
}
define("WRITELOG_QUERY", true);
$instance_table = new Table();
$A2B->set_instance_table($instance_table);
$table = new Table();
//$table -> debug_st = 1;
$mytopg = new MytoPg(0);
// debug level
$WHERE = 'id < \'100\'';
$WHEREREP = 'id < \'100\'';
$WWHERE = "WHERE {$WHERE}";
$WWHEREREP = "WHERE {$WHEREREP}";