Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/modules.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"enabled" => true,
"name" => "System",
"modules" => array (
"blacklist" => array (
"enabled" => true,
"name" => "BlackList"
),
"callcenter" => array (
"enabled" => true,
"name" => "Callcenter"
Expand Down
26 changes: 26 additions & 0 deletions config/tools/system/blacklist/db.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/*
* $Id$
* Copyright (C) 2016 PARADIS Corentin
*
* This file is part of opensips-cp, a free Web Control Panel Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

$module_id = "blacklist";

?>
26 changes: 26 additions & 0 deletions config/tools/system/blacklist/local.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/*
* $Id$
* Copyright (C) 2016 PARADIS Corentin
*
* This file is part of opensips-cp, a free Web Control Panel Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

$config->results_per_page = 5;
$config->results_page_range = 10;
$talk_to_this_assoc_id = 1;
35 changes: 35 additions & 0 deletions config/tools/system/blacklist/menu.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* $Id$
* Copyright (C) 2016 PARADIS Corentin
*
* This file is part of opensips-cp, a free Web Control Panel Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

$config->menu_item = array(
array(
"blacklist.php",
"Global blacklist"
),
array(
"userblacklist.php",
"User blacklist"
),
);
?>

51 changes: 51 additions & 0 deletions web/tools/system/blacklist/apply_changes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/*
* $Id$
* Copyright (C) 2016 PARADIS Corentin
*
* This file is part of opensips-cp, a free Web Control Panel Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

session_start();

require("../../../../config/tools/system/blacklist/local.inc.php");
require("../../../common/mi_comm.php");
require("../../../common/cfg_comm.php");

$command= "reload_blacklist"

?>
<fieldset><legend>Sending MI command: <?=$command?></legend>
<br>
<?php

$mi_connectors=get_proxys_by_assoc_id($talk_to_this_assoc_id);

for ($i=0;$i<count($mi_connectors);$i++){
echo "Sending to <b>".$mi_connectors[$i]."</b> : ";

$message=mi_command($command, $mi_connectors[$i], $mi_type, $errors, $status);
if (!$errors) {
echo "<font color='green'><b>Success</b></font>";
}
echo "<br>";
}

?>

</fieldset>
Loading