xml_cdr starts getting ready for billing app

This commit is contained in:
luis daniel lucio quiroz 2014-06-19 20:52:41 +00:00
parent a5fce3c667
commit d3cf54faf0
1 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,13 @@
*/ */
//check the permission //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')) { if(defined('STDIN')) {
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]); $document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
preg_match("/^(.*)\/app\/.*$/", $document_root, $matches); preg_match("/^(.*)\/app\/.*$/", $document_root, $matches);
@ -207,6 +214,11 @@
$database->fields['extension_uuid'] = check_str(urldecode($xml->variables->extension_uuid)); $database->fields['extension_uuid'] = check_str(urldecode($xml->variables->extension_uuid));
} }
//billing information
if ($is_billing){
//
}
//insert xml_cdr into the db //insert xml_cdr into the db
if (strlen($start_stamp) > 0) { if (strlen($start_stamp) > 0) {
$database->add(); $database->add();