├── .gitattributes ├── .gitignore ├── view ├── footer.php ├── sip.peers.php ├── sip.channels.php ├── diag.total.php ├── sip.registry.php ├── rep.noanswer.php ├── sip.channelstats.php ├── rep.group.ext.cdr.php ├── queue.php ├── diag.database.php ├── login.php ├── rep.cdr.ext.php ├── rep.cdr.php └── header.php ├── screenshot ├── cdr.png ├── diag.png ├── queue.png └── channels.png ├── public ├── css │ ├── icons.png │ ├── icons-2x.png │ ├── images │ │ ├── lock.png │ │ ├── icons.png │ │ ├── unlock.png │ │ ├── csv-icon.png │ │ ├── icons-2x.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_228ef1_256x240.png │ │ ├── ui-icons_2694e8_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_3d80b3_256x240.png │ │ ├── ui-icons_444444_256x240.png │ │ ├── ui-icons_555555_256x240.png │ │ ├── ui-icons_72a7cf_256x240.png │ │ ├── ui-icons_777620_256x240.png │ │ ├── ui-icons_777777_256x240.png │ │ ├── ui-icons_cc0000_256x240.png │ │ ├── ui-icons_ef8c08_256x240.png │ │ ├── ui-icons_ffd27a_256x240.png │ │ ├── ui-icons_ffffff_256x240.png │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ ├── ui-bg_flat_15_cd0a0a_40x100.png │ │ ├── ui-bg_glass_50_3baae3_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_80_d7ebf9_1x400.png │ │ ├── ui-bg_glass_100_e4f1fb_1x400.png │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ ├── ui-bg_diagonals-thick_90_eeeeee_40x40.png │ │ ├── ui-bg_highlight-hard_100_f2f5f7_1x100.png │ │ ├── ui-bg_highlight-hard_70_000000_1x100.png │ │ ├── ui-bg_highlight-soft_100_deedf7_1x100.png │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ ├── ui-bg_highlight-soft_25_ffef8f_1x100.png │ │ └── ui-bg_highlight-soft_75_ffe45c_1x100.png │ ├── index.css │ ├── jsgrid.css │ ├── jsgrid.min.css │ ├── login.css │ ├── style.css │ ├── theme.css │ └── daterangepicker.css ├── js │ ├── setting.js │ ├── date.format.js │ ├── jsgrid.sort-strategies.js │ ├── fields │ │ ├── jsgrid.field.number.js │ │ ├── jsgrid.field.textarea.js │ │ ├── jsgrid.field.text.js │ │ ├── jsgrid.field.checkbox.js │ │ ├── jsgrid.field.select.js │ │ └── jsgrid.field.control.js │ ├── i18n │ │ ├── zh-cn.js │ │ ├── zh-tw.js │ │ ├── ja.js │ │ ├── he.js │ │ ├── tr.js │ │ ├── es.js │ │ ├── pt.js │ │ ├── fr.js │ │ ├── pt-br.js │ │ ├── ru.js │ │ ├── de.js │ │ ├── ka.js │ │ └── pl.js │ ├── jsgrid.field.js │ ├── jsgrid.load-indicator.js │ ├── json2csv.js │ ├── jsgrid.load-strategies.js │ └── jsgrid.validation.js ├── diag_total.js ├── diag_database.js ├── sip_registry.js ├── sip_peers.js ├── report_group_ext_cdr.js ├── sip_channels.js ├── sip_channelstats.js ├── report_noanswer.js ├── report_cdr_ext.js ├── report_cdr.js └── queue.js ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── db ├── diag │ ├── total │ │ └── index.php │ ├── database │ │ └── index.php │ ├── sip_registry │ │ └── index.php │ ├── sip_peers │ │ └── index.php │ ├── sip_channelstat │ │ └── index.php │ └── sip_channels │ │ └── index.php ├── queue │ └── status │ │ └── index.php ├── report │ ├── cdr │ │ ├── index.php │ │ └── download.php │ ├── group_ext_cdr │ │ └── index.php │ └── no_answer │ │ └── index.php ├── config.php ├── test.php └── asterisk.php ├── models ├── diag │ ├── database.php │ ├── total.php │ ├── sip_registry.php │ ├── sip_channelstat.php │ ├── sip_peer.php │ ├── sip_peers.php │ └── sip_channels.php ├── report │ ├── group.ext.cdr.php │ ├── noanswer.php │ └── cdr.php └── queue │ └── status.php ├── download.php ├── README.md └── index.php /.gitattributes: -------------------------------------------------------------------------------- 1 | *.* -crlf 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | /nbproject/private/ 3 | -------------------------------------------------------------------------------- /view/footer.php: -------------------------------------------------------------------------------- 1 | 3 | "; 4 | ?> -------------------------------------------------------------------------------- /screenshot/cdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/screenshot/cdr.png -------------------------------------------------------------------------------- /screenshot/diag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/screenshot/diag.png -------------------------------------------------------------------------------- /public/css/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/icons.png -------------------------------------------------------------------------------- /public/js/setting.js: -------------------------------------------------------------------------------- 1 | function monitor() { 2 | return "/var/spool/asterisk/monitor/"; 3 | } 4 | -------------------------------------------------------------------------------- /screenshot/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/screenshot/queue.png -------------------------------------------------------------------------------- /public/css/icons-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/icons-2x.png -------------------------------------------------------------------------------- /public/js/date.format.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/js/date.format.js -------------------------------------------------------------------------------- /screenshot/channels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/screenshot/channels.png -------------------------------------------------------------------------------- /public/css/images/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/lock.png -------------------------------------------------------------------------------- /public/css/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/icons.png -------------------------------------------------------------------------------- /public/css/images/unlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/unlock.png -------------------------------------------------------------------------------- /public/css/images/csv-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/csv-icon.png -------------------------------------------------------------------------------- /public/css/images/icons-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/icons-2x.png -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_2694e8_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_2694e8_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_3d80b3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_3d80b3_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_72a7cf_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_72a7cf_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_flat_15_cd0a0a_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_flat_15_cd0a0a_40x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_50_3baae3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_glass_50_3baae3_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_80_d7ebf9_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_glass_80_d7ebf9_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_100_e4f1fb_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_glass_100_e4f1fb_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-hard_70_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_highlight-hard_70_000000_1x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zheltovanton/asteriskgui/HEAD/public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /view/sip.peers.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Sip peers

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 | '; 18 | 19 | require 'footer.php'; 20 | ?> -------------------------------------------------------------------------------- /view/sip.channels.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Channels

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 | '; 18 | 19 | require 'footer.php'; 20 | ?> -------------------------------------------------------------------------------- /view/diag.total.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Diagnostics

10 |
11 | 12 |
13 | 14 |
15 |
16 | 17 |
18 | '; 19 | 20 | require 'footer.php'; 21 | ?> -------------------------------------------------------------------------------- /view/sip.registry.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Sip registry

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 | '; 18 | 19 | require 'footer.php'; 20 | ?> -------------------------------------------------------------------------------- /view/rep.noanswer.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Not answered

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 | '; 18 | 19 | require 'footer.php'; 20 | ?> -------------------------------------------------------------------------------- /view/sip.channelstats.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Channels stat

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 | '; 18 | 19 | require 'footer.php'; 20 | ?> -------------------------------------------------------------------------------- /view/rep.group.ext.cdr.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Report group by Extension

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 | '; 18 | 19 | require 'footer.php'; 20 | ?> -------------------------------------------------------------------------------- /db/diag/total/index.php: -------------------------------------------------------------------------------- 1 | getAll(); 11 | break; 12 | } 13 | 14 | header("Content-Type: application/json"); 15 | echo json_encode($result); 16 | 17 | ?> 18 | 19 | 20 | -------------------------------------------------------------------------------- /db/queue/status/index.php: -------------------------------------------------------------------------------- 1 | getAll( 11 | array("filter" => $f)); 12 | break; 13 | } 14 | 15 | header("Content-Type: application/json"); 16 | echo json_encode($result); 17 | 18 | ?> 19 | -------------------------------------------------------------------------------- /view/queue.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Show queues

10 |
11 | 12 |
13 | 14 | 15 |
16 | 17 | 18 |
19 | '; 20 | 21 | require 'footer.php'; 22 | ?> -------------------------------------------------------------------------------- /view/diag.database.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |

Show database

10 |
11 | 12 |
13 | 14 | 15 |
16 | 17 | 18 |
19 | '; 20 | 21 | require 'footer.php'; 22 | ?> -------------------------------------------------------------------------------- /db/diag/database/index.php: -------------------------------------------------------------------------------- 1 | getAll( 11 | array("str" => $_GET["str"])); 12 | break; 13 | } 14 | 15 | header("Content-Type: application/json"); 16 | echo json_encode($result); 17 | 18 | ?> 19 | 20 | 21 | -------------------------------------------------------------------------------- /db/diag/sip_registry/index.php: -------------------------------------------------------------------------------- 1 | getAll( 11 | array("host" => $_GET["host"], 12 | "username" => $_GET["username"], 13 | "state" => $_GET["state"])); 14 | break; 15 | } 16 | 17 | header("Content-Type: application/json"); 18 | echo json_encode($result); 19 | 20 | ?> 21 | 22 | 23 | -------------------------------------------------------------------------------- /db/report/cdr/index.php: -------------------------------------------------------------------------------- 1 | getAll( 13 | array("start" => $_GET["start"], 14 | "end" => $_GET["end"], 15 | "text" => $_GET["text"])); 16 | break; 17 | } 18 | 19 | header("Content-Type: application/json"); 20 | echo json_encode($result); 21 | 22 | ?> 23 | -------------------------------------------------------------------------------- /db/report/group_ext_cdr/index.php: -------------------------------------------------------------------------------- 1 | getAll( 13 | array("calldate" => $_GET["calldate"], 14 | "src" => $_GET["src"])); 15 | break; 16 | } 17 | 18 | header("Content-Type: application/json"); 19 | echo json_encode($result); 20 | 21 | ?> 22 | -------------------------------------------------------------------------------- /db/config.php: -------------------------------------------------------------------------------- 1 | "mysql:host=localhost;dbname=asteriskcdrdb", 5 | "username" => "freepbxuser", //Mysql login 6 | "password" => "60b47abf8d41e93ecb964bd5b6f97948", //Mysql password 7 | "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), 8 | "asterisk_ip" => "127.0.0.1", 9 | "manager_port" => "5038", 10 | "manager_login" => "admin", 11 | "manager_password" => "adm123", 12 | "logfile" => "/var/www/html/asteriskreport/db/log.log", 13 | "monitor" => "/var/spool/asterisk/monitor/", 14 | "users" => array('admin' => 'password', 'user' => 'user') 15 | ); 16 | 17 | 18 | -------------------------------------------------------------------------------- /db/report/no_answer/index.php: -------------------------------------------------------------------------------- 1 | getAll( 13 | array("calldate" => $_GET["calldate"], 14 | "clid" => $_GET["clid"], 15 | "src" => $_GET["src"], 16 | "dst" => $_GET["dst"], 17 | "dcontext" => $_GET["dcontext"])); 18 | break; 19 | } 20 | 21 | header("Content-Type: application/json"); 22 | echo json_encode($result); 23 | 24 | ?> 25 | -------------------------------------------------------------------------------- /models/diag/database.php: -------------------------------------------------------------------------------- 1 | Command('database show')); 14 | for($i = 10; $i <= count($rows); $i++) { 15 | $find = true; 16 | if (($str) && (stripos($rows[$i],$str) === false)) { 17 | $find = false; 18 | } 19 | if ($find) 20 | array_push($json, array('row' => $i, 'cmd' => 'database', 'str' => $rows[$i])); 21 | } 22 | 23 | return $json; 24 | } 25 | 26 | 27 | } 28 | 29 | ?> -------------------------------------------------------------------------------- /db/test.php: -------------------------------------------------------------------------------- 1 | 1) $filename = $_GET['audio']; 16 | header("Content-Type: application/$system_audio_format"); 17 | header('Content-Transfer-Encoding: binary'); 18 | header('Content-Length: '.filesize($filename)); 19 | header("Content-Disposition: attachment; filename=".$_GET['audio']); 20 | readfile($filename); 21 | } 22 | 23 | exit(); 24 | ?> 25 | -------------------------------------------------------------------------------- /db/diag/sip_peers/index.php: -------------------------------------------------------------------------------- 1 | getAll( 15 | array("name" => $_GET["name"], 16 | "ip" => $_GET["ip"], 17 | "port" => $_GET["port"], 18 | "state" => $_GET["state"], 19 | "desc" => $_GET["desc"])); 20 | break; 21 | } 22 | 23 | header("Content-Type: application/json"); 24 | echo json_encode($result); 25 | 26 | ?> 27 | 28 | 29 | -------------------------------------------------------------------------------- /view/login.php: -------------------------------------------------------------------------------- 1 | 24 |
25 | 26 |
27 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /view/rep.cdr.ext.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | Report CDR 10 |
11 | 12 |
13 |
14 | 15 | 16 |
17 |
18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 | '; 26 | 27 | require 'footer.php'; 28 | ?> -------------------------------------------------------------------------------- /view/rep.cdr.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | Report CDR 9 |
10 | 11 |
12 |
13 | 14 | 15 |
16 |
17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 |
25 | '; 26 | 27 | 28 | require 'footer.php'; 29 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Asterisk.GUI 2 | 3 | This is the Javascript / HTML / CSS / Ajax related to asterisk app. 4 | Only for viewing settings and conditions, not to configure. 5 | Screenshot from real system with Elastix in folder "screenshot". 6 | Using AMI for request info about channels and mysql for CDR stat. 7 | 8 | Default login/password - demo/demo 9 | 10 | # Features 11 | - CDR stat 12 | - Show sip peers 13 | - Show sip registry 14 | - Show sip channel stats 15 | - Queues panel: realtime agent status and calls 16 | - Show diag info from "core show ... " 17 | - All tables support sorting, filtering and export to excel 18 | 19 | # Version 20 | 21 | Current version 0.5 22 | 23 | # Up and Running 24 | 25 | 1. `git clone https://github.com/zheltovanton/asteriskgui.git` 26 | 2. `cd asteriskgui` 27 | 3. `vim db/config.php` 28 | 4. Visit `http://localhost/asteriskgui` 29 | 30 | 31 | -------------------------------------------------------------------------------- /db/diag/sip_channelstat/index.php: -------------------------------------------------------------------------------- 1 | getAll( 11 | array("peer" => $_GET["peer"], 12 | "callid" => $_GET["callid"], 13 | "duration" => $_GET["duration"], 14 | "receive" => $_GET["receive"], 15 | "lostp" => $_GET["lostp"], 16 | "procentp" => $_GET["procentp"], 17 | "jitterp" => $_GET["jitterp"], 18 | "send" => $_GET["send"], 19 | "losts" => $_GET["losts"], 20 | "procents" => $_GET["procents"], 21 | "jitters" => $_GET["jitters"])); 22 | break; 23 | } 24 | 25 | header("Content-Type: application/json"); 26 | echo json_encode($result); 27 | 28 | ?> 29 | 30 | 31 | -------------------------------------------------------------------------------- /db/diag/sip_channels/index.php: -------------------------------------------------------------------------------- 1 | getAll( 11 | array("Channel" => $_GET["Channel"], 12 | "Context" => $_GET["Context"], 13 | "Extension" => $_GET["Extension"], 14 | "ChannelStateDesc" => $_GET["ChannelStateDesc"], 15 | "BridgedChannel" => $_GET["BridgedChannel"], 16 | "Application" => $_GET["Application"], 17 | "ApplicationData" => $_GET["ApplicationData"], 18 | "CallerIDnum" => $_GET["CallerIDnum"], 19 | "CallerIDname" => $_GET["CallerIDname"], 20 | "Duration" => $_GET["Duration"])); 21 | break; 22 | } 23 | 24 | header("Content-Type: application/json"); 25 | echo json_encode($result); 26 | 27 | ?> 28 | 29 | 30 | -------------------------------------------------------------------------------- /public/js/jsgrid.sort-strategies.js: -------------------------------------------------------------------------------- 1 | (function(jsGrid, $, undefined) { 2 | 3 | var isDefined = function(val) { 4 | return typeof(val) !== "undefined" && val !== null; 5 | }; 6 | 7 | var sortStrategies = { 8 | string: function(str1, str2) { 9 | if(!isDefined(str1) && !isDefined(str2)) 10 | return 0; 11 | 12 | if(!isDefined(str1)) 13 | return -1; 14 | 15 | if(!isDefined(str2)) 16 | return 1; 17 | 18 | return ("" + str1).localeCompare("" + str2); 19 | }, 20 | 21 | number: function(n1, n2) { 22 | return n1 - n2; 23 | }, 24 | 25 | date: function(dt1, dt2) { 26 | return dt1 - dt2; 27 | }, 28 | 29 | numberAsString: function(n1, n2) { 30 | return parseFloat(n1) - parseFloat(n2); 31 | } 32 | }; 33 | 34 | jsGrid.sortStrategies = sortStrategies; 35 | 36 | }(jsGrid, jQuery)); 37 | -------------------------------------------------------------------------------- /models/diag/total.php: -------------------------------------------------------------------------------- 1 | Command('core show version')); 13 | for($i = 10; $i <= 10; $i++) { 14 | array_push($json, array('row' => $i, 'cmd' => 'core ver', 'str' => $rows[$i])); 15 | } 16 | 17 | $rows = explode(PHP_EOL, $asterisk->Command('core show uptime')); 18 | for($i = 10; $i <= 11; $i++) { 19 | array_push($json, array('row' => $i, 'cmd' => 'core uptime', 'str' => $rows[$i])); 20 | } 21 | 22 | $rows = explode(PHP_EOL, $asterisk->Command('core show sysinfo')); 23 | for($i = 13; $i <= 17; $i++) { 24 | array_push($json, array('row' => $i, 'cmd' => 'core sysinfo', 'str' => $rows[$i])); 25 | } 26 | 27 | 28 | return $json; 29 | } 30 | 31 | 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /public/js/fields/jsgrid.field.number.js: -------------------------------------------------------------------------------- 1 | (function(jsGrid, $, undefined) { 2 | 3 | var TextField = jsGrid.TextField; 4 | 5 | function NumberField(config) { 6 | TextField.call(this, config); 7 | } 8 | 9 | NumberField.prototype = new TextField({ 10 | 11 | sorter: "number", 12 | align: "right", 13 | readOnly: false, 14 | 15 | filterValue: function() { 16 | return parseInt(this.filterControl.val() || 0, 10); 17 | }, 18 | 19 | insertValue: function() { 20 | return parseInt(this.insertControl.val() || 0, 10); 21 | }, 22 | 23 | editValue: function() { 24 | return parseInt(this.editControl.val() || 0, 10); 25 | }, 26 | 27 | _createTextBox: function() { 28 | return $("").attr("type", "number") 29 | .prop("readonly", !!this.readOnly); 30 | } 31 | }); 32 | 33 | jsGrid.fields.number = jsGrid.NumberField = NumberField; 34 | 35 | }(jsGrid, jQuery)); 36 | -------------------------------------------------------------------------------- /public/js/fields/jsgrid.field.textarea.js: -------------------------------------------------------------------------------- 1 | (function(jsGrid, $, undefined) { 2 | 3 | var TextField = jsGrid.TextField; 4 | 5 | function TextAreaField(config) { 6 | TextField.call(this, config); 7 | } 8 | 9 | TextAreaField.prototype = new TextField({ 10 | 11 | insertTemplate: function() { 12 | if(!this.inserting) 13 | return ""; 14 | 15 | return this.insertControl = this._createTextArea(); 16 | }, 17 | 18 | editTemplate: function(value) { 19 | if(!this.editing) 20 | return this.itemTemplate(value); 21 | 22 | var $result = this.editControl = this._createTextArea(); 23 | $result.val(value); 24 | return $result; 25 | }, 26 | 27 | _createTextArea: function() { 28 | return $("