Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 7:51 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: announace balance afer voucher recharge
PostPosted: Wed Jul 16, 2008 1:27 pm 
Offline

Joined: Wed Jun 25, 2008 3:10 pm
Posts: 45
Location: Germany
I want to play new balance to user after recharging voucher.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 30, 2008 6:09 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
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 :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 18, 2008 4:30 pm 
Offline

Joined: Mon Apr 14, 2008 8:37 pm
Posts: 356
Location: Canada
ummm... you don't need all that code. just go to abilling.conf and you can set that up. its pretty simple really. no code need, just a simple yes/no :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group