From bacd811ab132e2aaf49a82e6779bd48dbae1e0f8 Mon Sep 17 00:00:00 2001 From: luis daniel lucio quiroz Date: Thu, 19 Jun 2014 20:52:41 +0000 Subject: [PATCH] xml_cdr starts getting ready for billing app --- app/xml_cdr/v_xml_cdr_import.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 8f8e038c54..8fbfde7fc7 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -25,6 +25,13 @@ */ //check the permission + $is_billing = 0; // by default billing is not used + + if (file_exists("app/billings/root.php")){ + $is_billing = 1; + require_once "app/billings/functions.php"; + } + if(defined('STDIN')) { $document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]); preg_match("/^(.*)\/app\/.*$/", $document_root, $matches); @@ -207,6 +214,11 @@ $database->fields['extension_uuid'] = check_str(urldecode($xml->variables->extension_uuid)); } + //billing information + if ($is_billing){ + // + } + //insert xml_cdr into the db if (strlen($start_stamp) > 0) { $database->add();