Changeset 896
- Timestamp:
- 07/24/08 10:31:33 (2 months ago)
- Files:
-
- trunk/common/lib/Class.A2Billing.php (modified) (5 diffs)
- trunk/common/lib/Class.RateEngine.php (modified) (2 diffs)
- trunk/DataBase/mysql-5.x/UPDATE-a2billing-v1.3.0-to-v1.4.0-mysql.sql (modified) (1 diff)
- trunk/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.4.0-pgsql.sql (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/common/lib/Class.A2Billing.php
r895 r896 663 663 $this->accountcode = $agi->request['agi_accountcode']; 664 664 //$this->dnid = $agi->request['agi_dnid']; 665 $this->dnid = $agi->request['agi_extension'];666 665 $this->dnid = $agi->request['agi_extension']; 666 667 667 //Call function to find the cid number 668 668 $this -> isolate_cid(); … … 733 733 $this->destination = $res_dtmf ["result"]; 734 734 } 735 735 736 736 //REDIAL FIND THE LAST DIALED NUMBER (STORED IN THE DATABASE) 737 737 if (strlen($this->destination)<=2 && is_numeric($this->destination) && $this->destination>=0){ … … 852 852 $this->destination = str_replace('*', '', $this->destination); 853 853 854 $this->save_redial_number($ this->destination);855 854 $this->save_redial_number($agi, $this->destination); 855 856 856 // LOOKUP RATE : FIND A RATE FOR THIS DESTINATION 857 857 $resfindrate = $RateEngine->rate_engine_findrates($this, $this->destination,$this->tariff); … … 1001 1001 return -1; 1002 1002 } 1003 1003 1004 1004 for ($k=0;$k< $sip_buddies+$iax_buddies;$k++) 1005 1005 { … … 2572 2572 } 2573 2573 2574 function save_redial_number($ number){2574 function save_redial_number($agi, $number){ 2575 2575 if(($this->mode == 'did') || ($this->mode == 'callback')){ 2576 2576 return; trunk/common/lib/Class.RateEngine.php
r884 r896 1024 1024 1025 1025 $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."', "; 1027 1029 1028 1030 if ($A2B->config["database"]['dbtype'] == "postgres"){ … … 1032 1034 } 1033 1035 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 1037 1040 $A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[CC_asterisk_stop QUERY = $QUERY]"); 1038 1041 trunk/DataBase/mysql-5.x/UPDATE-a2billing-v1.3.0-to-v1.4.0-mysql.sql
r895 r896 1030 1030 1031 1031 1032 ALTER 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 983 983 CREATE TABLE cc_packgroup_package ( 984 984 packagegroup_id integer NOT NULL , 985 package_id integer NOT NULL ,985 package_id integer NOT NULL , 986 986 CONSTRAINT cc_packgroup_package_pkey PRIMARY KEY ( packagegroup_id , package_id ) 987 987 ); … … 1023 1023 1024 1024 1025 1026 1025 ALTER TABLE cc_call ADD dnid character varying( 40 ); 1026 1027
