asterisk2billing.org http://forum.asterisk2billing.org/ |
|
Assign a new card after the card expired http://forum.asterisk2billing.org/viewtopic.php?f=15&t=4165 |
Page 1 of 1 |
Author: | sukasem [ Fri Aug 22, 2008 9:46 pm ] |
Post subject: | Assign a new card after the card expired |
Hi, Expiration days/date in A2billing feature's kind of in the middle of something. When cards expired, It should do something more than just announce "Sorry, you card has expired". I think it should do like: 1. check if the card expire then announce "Sorry, your card has expired" 2. reset the balance/credit to zero (Optional but it good idea because I can search for these cards easier and use batch up to delete the cards) 3. remove callerID from CallerID table. (Optional, not necessary if assign a new card work) 4. ask caller for new card. Anybody has some code or other idea to handle this? I know this could be very easy to write some script to handle this but I have no idea how to do it. (Stavros hint it could be done thru cronjob, or in a2billing.php or even class.a2billing.php but I don't know how) Thank in advance, Sukasem |
Author: | sukasem [ Tue Aug 26, 2008 12:32 am ] |
Post subject: | |
Here what I get it to work: open Class.A2billing.php Find this following code: Quote: if ($prompt == "prepaid-zero-balance" && $this->agiconfig['notenoughcredit_cardnumber']==1) { $this->accountcode=''; $callerID_enable=0; $this->agiconfig['cid_auto_assign_card_to_cid']=0; if ($this->agiconfig['notenoughcredit_assign_newcardnumber_cid']==1) $this -> ask_other_cardnumber=1; }else{ return -2; } Then insert the follwing code before }else{ Quote: }elseif ($prompt == "prepaid-card-expired") {
$this->accountcode=''; $callerID_enable=0; $this->agiconfig['cid_auto_assign_card_to_cid']=0; $this -> ask_other_cardnumber=1; |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |