TUTORIAL: Accessing CDRs in MySQL
Estimated reading: 1 minute
To access CDRs from MySQL, you must first connect to the machine.
Please refer to the following tutorialto access the machine using a command terminal.
Type the following command once logged in to the machine:
/opt/pbxware/sh/mysql The MySQL console is displayed:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15498 Server version: 5.6.39-83.1 Source distribution Copyright (c) 2009-2018 Percona LLC and/or its affiliates Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> Select the pbxware database:
USE pbxware; For example, to list all records where a field equals a certain value, type:
SELECT * FROM cdr;
You can fully filter your search by adding custom fields, using the “WHERE” and “LIKE” arguments
SELECT * FROM cdr WHERE src LIKE 100;
In the example above, only calls originating from extension 100 will be displayed.

