This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| #!/usr/bin/php | |
| /* | |
| * Script: lgaetz-tctoggle.php (Modified) | |
| * Original Author: lgaetz - https://gist.github.com/lgaetz/28d41cf0ff5af1179d7840d67aae971c | |
| * Modifications by: Eugene Robertus, 2025 | |
| * | |
| * License: GNU GPL v3+ | |
| * This script and its modifications are distributed under the same GPL license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Overview: | |
| * This script is designed to clean and optimize the Call Detail Records (CDR) | |
| * and Channel Event Logging (CEL) tables in an Asterisk-based PBX system. | |
| * The process involves creating new temporary tables (`cdr_new` and `cel_new`) | |
| * with the same structure as the existing ones, filtering and copying relevant | |
| * data into these new tables, and then replacing the old tables with the new ones. | |
| * | |
| * Key Steps: | |
| * 1. Drop any existing temporary tables to avoid conflicts. |