Changeset 884
- Timestamp:
- 07/11/08 12:48:33 (2 months ago)
- Files:
-
- trunk/common/lib/Class.A2Billing.php (modified) (3 diffs)
- trunk/common/lib/Class.RateEngine.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/common/lib/Class.A2Billing.php
r860 r884 852 852 $this->destination = str_replace('*', '', $this->destination); 853 853 854 $this->save_redial_number($this->destination); 855 854 856 // LOOKUP RATE : FIND A RATE FOR THIS DESTINATION 855 857 $resfindrate = $RateEngine->rate_engine_findrates($this, $this->destination,$this->tariff); … … 967 969 } 968 970 } 971 972 $this->save_redial_number($this->destination); 969 973 970 974 $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "SIP o IAX DESTINATION : ".$this->destination); … … 2490 2494 } 2491 2495 2496 function save_redial_number($number){ 2497 if(($this->mode == 'did') || ($this->mode == 'callback')){ 2498 return; 2499 } 2500 $QUERY = "UPDATE cc_card SET redial = '{$number}' WHERE username='".$this->accountcode."'"; 2501 $result = $this->instance_table -> SQLExec ($this->DBHandle, $QUERY, 0); 2502 $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[SAVING DESTINATION FOR REDIAL: SQL: {$QUERY}]:[result: {$result}]"); 2503 } 2492 2504 2493 2505 }; trunk/common/lib/Class.RateEngine.php
r877 r884 1045 1045 $A2B -> credit = $A2B -> credit + $cost; 1046 1046 1047 if ($didcall==0 && $callback==0) $myclause_nodidcall = " , redial='".$calledstation."' ";1048 else $myclause_nodidcall='';1049 1050 1051 1047 if ($A2B->nbused>0){ 1052 1048 $QUERY = "UPDATE cc_card SET credit= credit$signe".a2b_round(abs($cost))." $myclause_nodidcall, lastuse=now(), nbused=nbused+1 WHERE username='".$A2B->username."'";
