Hi,
I am not sure of it as i have not used vouchers filling through phone yet..
try editing the a2billing.php as follows :
1) Locate /var/lib/asterisk/agi-bin/a2billing.php
2)
Make a backup copy of it... ,,, in case it did not work
3) Locate the code part that deals with vouchers :
Code:
}elseif ($mode == 'voucher'){
if ($A2B->agiconfig['answer_call']==1){
$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, '[ANSWER CALL]');
$agi->answer();
$status_channel=6;
}else{
$A2B -> debug( VERBOSE | WRITELOG, $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( WRITELOG, $agi, __FILE__, __LINE__, "[TRY : callingcard_ivr_authenticate]");
for ($k=0;$k<3;$k++){
$vou_res = $A2B -> refill_card_with_voucher($agi, null);
$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "VOUCHER RESULT = $vou_res");
if ($vou_res==1){
break;
} else {
$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[NOTENOUGHCREDIT - refill_card_withvoucher fail] ");
}
}
// SAY GOODBYE
if ($A2B->agiconfig['say_goodbye']==1) $agi-> stream_file('prepaid-final', '#');
$agi->hangup();
if ($A2B->set_inuse==1) $A2B->callingcard_acct_start_inuse($agi,0);
$A2B -> write_log("[STOP - EXIT]", 0);
exit();
4) Insert the following line before the SAY GOODBYE part
Code:
$A2B-> fct_say_balance ($agi, $A2B-> credit);
Hope it works... do not sue me if it did not