Changeset 896

Show
Ignore:
Timestamp:
07/24/08 10:31:33 (2 months ago)
Author:
areski
Message:

Feature : Add DNID inside the CDR + bug on save redial

Files:

Legend:

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

    r895 r896  
    663663                $this->accountcode      = $agi->request['agi_accountcode']; 
    664664                //$this->dnid           = $agi->request['agi_dnid']; 
    665                 $this->dnid             = $agi->request['agi_extension']; 
    666  
     665                $this->dnid                    = $agi->request['agi_extension']; 
     666                 
    667667                //Call function to find the cid number 
    668668                $this -> isolate_cid(); 
     
    733733                        $this->destination = $res_dtmf ["result"]; 
    734734                } 
    735  
     735                 
    736736                //REDIAL FIND THE LAST DIALED NUMBER (STORED IN THE DATABASE) 
    737737                if (strlen($this->destination)<=2 && is_numeric($this->destination) && $this->destination>=0){ 
     
    852852                $this->destination = str_replace('*', '', $this->destination); 
    853853 
    854                 $this->save_redial_number($this->destination); 
    855  
     854                $this->save_redial_number($agi, $this->destination); 
     855                 
    856856                // LOOKUP RATE : FIND A RATE FOR THIS DESTINATION 
    857857                $resfindrate = $RateEngine->rate_engine_findrates($this, $this->destination,$this->tariff); 
     
    10011001                        return -1; 
    10021002                } 
    1003  
     1003                 
    10041004                for ($k=0;$k< $sip_buddies+$iax_buddies;$k++) 
    10051005                { 
     
    25722572        } 
    25732573 
    2574         function save_redial_number($number){ 
     2574        function save_redial_number($agi, $number){ 
    25752575                if(($this->mode == 'did') || ($this->mode == 'callback')){ 
    25762576                    return; 
  • trunk/common/lib/Class.RateEngine.php

    r884 r896  
    10241024 
    10251025                $QUERY = "INSERT INTO cc_call (uniqueid, sessionid,  username, card_id, nasipaddress, starttime, sessiontime, real_sessiontime, calledstation, ". 
    1026                         " terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('".$A2B->uniqueid."', '".$A2B->channel."',  '".$A2B->username."','".$A2B->id_card."', '".$A2B->hostname."', "; 
     1026                        " terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, " . 
     1027                        " id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer, dnid) VALUES ('".$A2B->uniqueid."', '".$A2B->channel."',  '".$A2B->username."','". 
     1028                        $A2B->id_card."', '".$A2B->hostname."', "; 
    10271029 
    10281030                if ($A2B->config["database"]['dbtype'] == "postgres"){ 
     
    10321034                } 
    10331035 
    1034                 $QUERY .= ", '$sessiontime', '".$this->real_answeredtime."', '$calledstation', '$dialstatus', now(), '$rateapply', '$signe_cc_call".a2b_round(abs($cost))."', ". 
    1035                         " '', '', '$calldestination', '$id_tariffgroup', '$id_tariffplan', '$id_ratecard', '".$this -> usedtrunk."', '".$A2B->CallerID."', '$calltype', '$buyrateapply', '$buycost', '$id_card_package_offer')"; 
    1036  
     1036                $QUERY .=       ", '$sessiontime', '".$this->real_answeredtime."', '$calledstation', '$dialstatus', now(), '$rateapply', '$signe_cc_call".a2b_round(abs($cost))."', ". 
     1037                                        " '', '', '$calldestination', '$id_tariffgroup', '$id_tariffplan', '$id_ratecard', '".$this -> usedtrunk."', '".$A2B->CallerID."', '$calltype', ". 
     1038                                        "'$buyrateapply', '$buycost', '$id_card_package_offer', '".$A2B->dnid."')"; 
     1039                 
    10371040                $A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[CC_asterisk_stop  QUERY = $QUERY]"); 
    10381041 
  • trunk/DataBase/mysql-5.x/UPDATE-a2billing-v1.3.0-to-v1.4.0-mysql.sql

    r895 r896  
    10301030 
    10311031 
     1032ALTER TABLE cc_call ADD dnid CHAR( 40 ); 
     1033 
     1034 
  • trunk/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.4.0-pgsql.sql

    r895 r896  
    983983CREATE TABLE cc_packgroup_package ( 
    984984        packagegroup_id         integer NOT NULL , 
    985         package_id              integer NOT NULL , 
     985        package_id                     integer NOT NULL , 
    986986        CONSTRAINT cc_packgroup_package_pkey PRIMARY KEY  ( packagegroup_id , package_id ) 
    987987); 
     
    10231023 
    10241024 
    1025  
    1026  
     1025ALTER TABLE cc_call ADD dnid character varying( 40 ); 
     1026 
     1027 


Google