forked from sorvani/freepbx-helper-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc_test.php
More file actions
50 lines (45 loc) · 1.18 KB
/
Copy pathfunc_test.php
File metadata and controls
50 lines (45 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
require_once 'AstMan.php';
$astman=new AstMan;
$value="101";
$astman->Login();
if (strlen($astman->error) > 0) {
echo $astman->error;echo "\r\n<br />";
return;
} else {
echo "Login Successful.\r\n";echo "\r\n<br />";
}
/*
$endpoints=$astman->GetEndpointsPJSIP();
if (strlen($astman->error) > 0) {
echo $astman->error;echo "\r\n<br />";
return;
} else {
echo "GetEndpointsPJSIP Successful.\r\n";echo "\r\n<br />";
}
echo "Dumping \$endpoints.\r\n";echo "\r\n<br />";
echo "\r\n<pre>\r\n";
var_dump($endpoints);echo "\r\n</pre>\r\n<br />";
echo "\r\n";echo "\r\n<br />";
*/
$ext_detail=$astman->PJSIPShowEndpoint($value);
if (strlen($astman->error) > 0) {
echo $astman->error;echo "\r\n<br />";
return;
} else {
echo "PJSIPShowEndpoint Successful.\r\n";echo "\r\n<br />";
}
echo "Dumping \$ext_detail.\r\n";echo "\r\n<br />";
var_dump($ext_detail);echo "\r\n<br />";
echo "\r\n";echo "\r\n<br />";
//foreach($ext_detail as $skey=>$svalue) {
// echo "$skey says $svalue<br>\r\n";
//}
$astman->Logout();
if (strlen($astman->error) > 0) {
echo $astman->error;echo "\r\n<br />";
return;
} else {
echo "Logut Successful.\r\n";echo "\r\n<br />";
}
?>