} $RateEngine = new RateEngine(); if ($A2B->CC_TESTING) { $RateEngine->debug_st = 1; $accountcode = '2222222222'; } if ($mode == 'standard') { if ($A2B->agiconfig['answer_call'] == 1) { $A2B->debug(INFO, $agi, __FILE__, __LINE__, '[ANSWER CALL]'); $agi->answer(); $status_channel = 6; } else { $A2B->debug(INFO, $agi, __FILE__, __LINE__, '[NO ANSWER CALL]'); $status_channel = 4; } $A2B->play_menulanguage($agi); // Play intro message if (strlen($A2B->agiconfig['intro_prompt']) > 0) { $agi->stream_file($A2B->agiconfig['intro_prompt'], '#'); } $cia_res = $A2B->callingcard_ivr_authenticate($agi); $A2B->debug(DEBUG, $agi, __FILE__, __LINE__, "[TRY : callingcard_ivr_authenticate]"); // CALL AUTHENTICATE AND WE HAVE ENOUGH CREDIT TO GO AHEAD if ($cia_res == 0) { // RE-SET THE CALLERID $A2B->callingcard_auto_setcallerid($agi); for ($i = 0; $i < $A2B->agiconfig['number_try']; $i++) { $RateEngine->Reinit(); $A2B->Reinit(); // RETRIEVE THE CHANNEL STATUS AND LOG : STATUS - CREIT - MIN_CREDIT_2CALL $stat_channel = $agi->channel_status($A2B->channel);