Ticket #4116: uninstall.php

File uninstall.php, 1.9 kB (added by pwalker, 2 years ago)

Modified uninstall.php

Line 
1 <?php
2 //This file is part of FreePBX.
3 //
4 //    FreePBX is free software: you can redistribute it and/or modify
5 //    it under the terms of the GNU General Public License as published by
6 //    the Free Software Foundation, either version 2 of the License, or
7 //    (at your option) any later version.
8 //
9 //    FreePBX is distributed in the hope that it will be useful,
10 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //    GNU General Public License for more details.
13 //
14 //    You should have received a copy of the GNU General Public License
15 //    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>.
16 //
17 // Copyright (C) 2005 qldrob
18 //
19 // TODO, is this needed...?
20 // is this global...? what if we include this files
21 // from a function...?
22 global $astman;
23
24 // Unconditional Call Forwarding
25 $fcc = new featurecode('callforward', 'cfon');
26 $fcc->delete();
27 unset($fcc);
28
29 $fcc = new featurecode('callforward', 'cfoff');
30 $fcc->delete();
31 unset($fcc);
32
33 $fcc = new featurecode('callforward', 'cfoff_any');
34 $fcc->delete();
35 unset($fcc);
36
37 // Call Forward on Busy
38 $fcc = new featurecode('callforward', 'cfbon');
39 $fcc->delete();
40 unset($fcc);
41
42 $fcc = new featurecode('callforward', 'cfboff');
43 $fcc->delete();
44 unset($fcc);
45
46 $fcc = new featurecode('callforward', 'cfboff_any');
47 $fcc->delete();
48 unset($fcc);
49
50 // Call Forward on No Answer/Unavailable (i.e. phone not registered)
51 $fcc = new featurecode('callforward', 'cfuon');
52 $fcc->delete();
53 unset($fcc);
54
55 $fcc = new featurecode('callforward', 'cfuoff');
56 $fcc->delete();
57 unset($fcc);
58
59 $fcc = new featurecode('callforward', 'cf_toggle');
60 $fcc->delete();
61 unset($fcc);
62
63 // remove all Call Forward options in effect on extensions
64 if ($astman) {
65   $astman->database_deltree('CF');
66   $astman->database_deltree('CFB');
67   $astman->database_deltree('CFU');
68 } else {
69   fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
70 }
71
72 ?>