Changeset 884

Show
Ignore:
Timestamp:
07/11/08 12:48:33 (3 months ago)
Author:
asiby
Message:

Fixing Redial to make it catch any dialed numbers and not only successfully called numbers.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/common/lib/Class.A2Billing.php

    r860 r884  
    852852                $this->destination = str_replace('*', '', $this->destination); 
    853853 
     854                $this->save_redial_number($this->destination); 
     855 
    854856                // LOOKUP RATE : FIND A RATE FOR THIS DESTINATION 
    855857                $resfindrate = $RateEngine->rate_engine_findrates($this, $this->destination,$this->tariff); 
     
    967969                        } 
    968970                } 
     971 
     972                $this->save_redial_number($this->destination); 
    969973 
    970974                $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "SIP o IAX DESTINATION : ".$this->destination); 
     
    24902494        } 
    24912495 
     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        } 
    24922504 
    24932505}; 
  • trunk/common/lib/Class.RateEngine.php

    r877 r884  
    10451045                        $A2B -> credit = $A2B -> credit + $cost; 
    10461046 
    1047                         if ($didcall==0 && $callback==0) $myclause_nodidcall = " , redial='".$calledstation."' "; 
    1048                         else $myclause_nodidcall=''; 
    1049  
    1050  
    10511047                        if ($A2B->nbused>0){ 
    10521048                                $QUERY = "UPDATE cc_card SET credit= credit$signe".a2b_round(abs($cost))." $myclause_nodidcall,  lastuse=now(), nbused=nbused+1 WHERE username='".$A2B->username."'"; 


Google