Created
July 24, 2017 17:55
-
-
Save jurasseck/4d6c7fa99123fe8883851d298df5d817 to your computer and use it in GitHub Desktop.
app/controller/astARI/actions.php
This file contains 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 | |
require_once '../../../lib/Util.php'; | |
require_once '../../model/asterisk/ARI.php'; | |
$ari = new \asterisk\ARI(); | |
//extract($_POST); | |
$action = 'SipReload'; | |
switch ($action) { | |
case 'SipReload' : | |
echo $ari->sipShowPeers(); | |
break; | |
default: | |
return ""; | |
break; | |
} | |
if ($_POST) { | |
$comando = base64_decode(@$value); | |
if ($comando == 'SipReload') { | |
$ari->sipReload(); | |
} | |
if ($comando == 'QueueReload') { | |
$ari->queueReload(); | |
} | |
if ($comando == 'DialplanReload') { | |
$ari->dialplanReload(); | |
} | |
if ($comando == 'Reload') { | |
$ari->serverReload(); | |
} | |
if ($comando == 'CoreRestartWhenConvenient') { | |
$ari->serverRestart('whenConvenient'); | |
} | |
if ($comando == 'CoreRestartGracefully') { | |
$ari->serverRestart('gracefully'); | |
} | |
if ($comando == 'CoreRestartNow') { | |
$ari->serverRestart('now'); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment