Changeset 8212
- Timestamp:
- 08/27/09 11:39:40 (2 years ago)
- Files:
-
- modules/branches/2.6/iaxsettings/install.php (modified) (2 diffs)
- modules/branches/2.6/iaxsettings/module.xml (modified) (2 diffs)
- modules/branches/2.6/sipsettings/install.php (modified) (2 diffs)
- modules/branches/2.6/sipsettings/module.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6/iaxsettings/install.php
r7883 r8212 23 23 global $amp_conf; 24 24 25 if (! function_exists("out")) { 26 function out($text) { 27 echo $text."<br />"; 28 } 29 } 30 31 if (! function_exists("outn")) { 32 function outn($text) { 33 echo $text; 34 } 35 } 36 25 37 $sql = <<< END 26 38 CREATE TABLE IF NOT EXISTS `iaxsettings` ( … … 32 44 ) 33 45 END; 34 sql($sql);35 46 36 ?> 47 outn(_("checking for iaxsettings table..")); 48 $tsql = "SELECT * FROM `iaxsettings` limit 1"; 49 $check = $db->getRow($tsql, DB_FETCHMODE_ASSOC); 50 if(DB::IsError($check)) { 51 out(_("none, creating table")); 52 // table does not exist, create it 53 sql($sql); 54 55 outn(_("populating default codecs..")); 56 $sip_settings = array( 57 array('ulaw' ,'1', '0'), 58 array('alaw' ,'1', '1'), 59 array('slin' ,'' , '2'), 60 array('g726' ,'' , '3'), 61 array('gsm' ,'1', '4'), 62 array('g729' ,'' , '5'), 63 array('ilbc' ,'' , '6'), 64 array('g723' ,'' , '7'), 65 array('g726aal2','' , '8'), 66 array('adpcm' ,'' , '9'), 67 array('lpc10' ,'' ,'10'), 68 array('speex' ,'' ,'11'), 69 array('g722' ,'' ,'12'), 70 ); 71 72 // Now insert minimal codec rows 73 $compiled = $db->prepare("INSERT INTO iaxsettings (keyword, data, seq, type) values (?,?,?,'1')"); 74 $result = $db->executeMultiple($compiled,$sip_settings); 75 if(DB::IsError($result)) { 76 out(_("fatal error occured populating defaults, check module")); 77 } else { 78 out(_("ulaw, alaw, gsm added")); 79 } 80 } else { 81 out(_("already exists")); 82 } modules/branches/2.6/iaxsettings/module.xml
r8081 r8212 2 2 <rawname>iaxsettings</rawname> 3 3 <name>Asterisk IAX Settings</name> 4 <version>2.6.0. 2</version>4 <version>2.6.0.3</version> 5 5 <publisher>Bandwidth.com</publisher> 6 6 <license>AGPLv3</license> … … 14 14 </description> 15 15 <changelog> 16 *2.6.0.3* #3832 16 17 *2.6.0.2* #3811, #3813 17 18 *2.6.0.1* corrected publisher/lic modules/branches/2.6/sipsettings/install.php
r7883 r8212 23 23 global $amp_conf; 24 24 25 if (! function_exists("out")) { 26 function out($text) { 27 echo $text."<br />"; 28 } 29 } 30 31 if (! function_exists("outn")) { 32 function outn($text) { 33 echo $text; 34 } 35 } 36 25 37 $sql = <<< END 26 38 CREATE TABLE IF NOT EXISTS `sipsettings` ( … … 32 44 ) 33 45 END; 34 sql($sql);35 46 36 ?> 47 outn(_("checking for sipsettings table..")); 48 $tsql = "SELECT * FROM `sipsettings` limit 1"; 49 $check = $db->getRow($tsql, DB_FETCHMODE_ASSOC); 50 if(DB::IsError($check)) { 51 out(_("none, creating table")); 52 // table does not exist, create it 53 sql($sql); 54 55 outn(_("populating default codecs..")); 56 $sip_settings = array( 57 array('ulaw' ,'1', '0'), 58 array('alaw' ,'1', '1'), 59 array('slin' ,'' , '2'), 60 array('g726' ,'' , '3'), 61 array('gsm' ,'1', '4'), 62 array('g729' ,'' , '5'), 63 array('ilbc' ,'' , '6'), 64 array('g723' ,'' , '7'), 65 array('g726aal2','' , '8'), 66 array('adpcm' ,'' , '9'), 67 array('lpc10' ,'' ,'10'), 68 array('speex' ,'' ,'11'), 69 array('g722' ,'' ,'12'), 70 ); 71 72 // Now insert minimal codec rows 73 $compiled = $db->prepare("INSERT INTO sipsettings (keyword, data, seq, type) values (?,?,?,'1')"); 74 $result = $db->executeMultiple($compiled,$sip_settings); 75 if(DB::IsError($result)) { 76 out(_("fatal error occured populating defaults, check module")); 77 } else { 78 out(_("ulaw, alaw, gsm added")); 79 } 80 } else { 81 out(_("already exists")); 82 } modules/branches/2.6/sipsettings/module.xml
r8190 r8212 2 2 <rawname>sipsettings</rawname> 3 3 <name>Asterisk SIP Settings</name> 4 <version>2.6.0. 4</version>4 <version>2.6.0.5</version> 5 5 <publisher>Bandwidth.com</publisher> 6 6 <license>AGPLv3</license> … … 14 14 </description> 15 15 <changelog> 16 *2.6.0.5* #3831 16 17 *2.6.0.4* spelling errors 17 18 *2.6.0.3* #3814
