root/freepbx/trunk/upgrades/2.3.0alpha/tables.php

Revision 3254, 0.9 kB (checked in by p_lindheimer, 7 years ago)

add the ability to set the moh class for outbound routes as well as for inbound routes and direct did routes

Line 
1 <?php
2
3
4 outn("Upgrading Inbound Routing to allow for Music on Hold per DID..");
5
6 $sql = "SELECT mohclass FROM incoming";
7 $confs = $db->getRow($sql, DB_FETCHMODE_ASSOC);
8 if (!DB::IsError($confs)) { // no error... Already done
9     out("Not Required");
10 } else {
11     $sql = "ALTER TABLE incoming ADD mohclass VARCHAR ( 80 ) DEFAULT \"default\"";
12     $results = $db->query($sql);
13     if(DB::IsError($results)) {
14             die($results->getMessage());
15     }
16     out("Done");
17 }
18
19
20 outn("Upgrading Users/Extension Table to allow for Music on Hold per Direct DID..");
21
22 $sql = "SELECT mohclass FROM users";
23 $confs = $db->getRow($sql, DB_FETCHMODE_ASSOC);
24 if (!DB::IsError($confs)) { // no error... Already done
25     out("Not Required");
26 } else {
27     $sql = "ALTER TABLE users ADD mohclass VARCHAR ( 80 ) DEFAULT \"default\"";
28     $results = $db->query($sql);
29     if(DB::IsError($results)) {
30             die($results->getMessage());
31     }
32     out("Done");
33 }
34
35 ?>
36
Note: See TracBrowser for help on using the browser.