Changeset 10152
- Timestamp:
- 07/14/10 23:46:58 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/conferences/functions.inc.php
r10133 r10152 88 88 global $version; 89 89 global $amp_conf; 90 global $astman; 91 92 if ($astver === null) { 93 $engineinfo = engine_getinfo(); 94 $astver = $engineinfo['version']; 95 } 96 $ast_ge_162 = version_compare($astver, '1.6.2', 'ge'); 97 // Default to conference meetme 98 $confapp = 'ext_meetme'; 99 if ($ast_ge_162 && $amp_conf['AMPENGINE'] == 'asterisk' && isset($astman) && $astman->connected()) { 100 //check for meetme application and fallback to confbridge if possible 101 $app = $astman->send_request('Command', array('Command' => 'module show like meetme')); 102 if (preg_match('/[1-9] modules loaded/', $app['data'])){ 103 $confapp='ext_meetme'; 104 } else { 105 $app = $astman->send_request('Command', array('Command' => 'module show like confbridge')); 106 if (preg_match('/[1-9] modules loaded/', $app['data'])){ 107 $confapp='ext_confbridge'; 108 } 109 } 110 } 111 90 112 switch($engine) { 91 113 case "asterisk": … … 98 120 $ext->add($contextname, 'STARTMEETME', '', new ext_setvar('GROUP(meetme)','${MEETME_ROOMNUM}')); 99 121 $ext->add($contextname, 'STARTMEETME', '', new ext_gotoif('$[${MAX_PARTICIPANTS} > 0 && ${GROUP_COUNT(${MEETME_ROOMNUM}@meetme)}>${MAX_PARTICIPANTS}]','MEETMEFULL,1')); 100 $ext->add($contextname, 'STARTMEETME', '', new ext_meetme('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 122 if ($confapp != 'ext_confbridge') { 123 $ext->add($contextname, 'STARTMEETME', '', new ext_meetme('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 124 } else { 125 $ext->add($contextname, 'STARTMEETME', '', new ext_confbridge('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 126 } 101 127 $ext->add($contextname, 'STARTMEETME', '', new ext_hangup('')); 102 128 modules/branches/2.9/conferences/page.conferences.php
r10133 r10152 52 52 redirect_standard('extdisplay'); 53 53 break; 54 } 55 } 56 57 //Check to see if conference application is only confbridge 58 global $amp_conf; 59 global $astman; 60 if ($astver === null) { 61 $engineinfo = engine_getinfo(); 62 $astver = $engineinfo['version']; 63 } 64 $ast_ge_162 = version_compare($astver, '1.6.2', 'ge'); 65 // Default to conference meetme 66 $confapp = 'ext_meetme'; 67 if ($ast_ge_162 && $amp_conf['AMPENGINE'] == 'asterisk' && isset($astman) && $astman->connected()) { 68 //check for meetme application and fallback to confbridge if possible 69 $app = $astman->send_request('Command', array('Command' => 'module show like meetme')); 70 if (preg_match('/[1-9] modules loaded/', $app['data'])){ 71 $confapp='ext_meetme'; 72 } else { 73 $app = $astman->send_request('Command', array('Command' => 'module show like confbridge')); 74 if (preg_match('/[1-9] modules loaded/', $app['data'])){ $confapp='ext_confbridge'; 75 } 54 76 } 55 77 } … … 197 219 $engineinfo = engine_getinfo(); 198 220 $astver = $engineinfo['version']; 199 if (version_compare($astver, '1.4', 'ge')) { 221 222 //If the application is confbridge remove options that aren't supported 223 if ($confapp=='ext_confbridge') { 224 str_replace("o","",$options); 225 str_replace("T","",$options); 226 } 227 228 if (version_compare($astver, '1.4', 'ge') && $confapp=='ext_meetme') { 200 229 ?> 201 230 <tr> … … 257 286 </td> 258 287 </tr> 288 <?php 289 //If the application is confbridge remove options that aren't supported 290 if ($confapp=='ext_confbridge') { 291 str_replace("i","",$options); 292 } 293 if ($confapp=='ext_meetme') { 294 ?> 259 295 <tr> 260 296 <td><a href="#" class="info"><?php echo _("User join/leave:")?><span><?php echo _("Announce user join/leave")?></span></a></td> … … 269 305 </td> 270 306 </tr> 307 <?php } ?> 271 308 <tr> 272 309 <td><a href="#" class="info"><?php echo _("Music on Hold:")?><span><?php echo _("Enable Music On Hold when the conference has a single caller")?></span></a></td> … … 319 356 </td> 320 357 </tr> 321 358 <?php 359 //If the application is confbridge remove options that aren't supported 360 if ($confapp=='ext_confbridge') { 361 str_replace("r","",$options); 362 } 363 if ($confapp=='ext_meetme') { 364 ?> 322 365 <tr> 323 366 <td><a href="#" class="info"><?php echo _("Record Conference:")?><span><?php echo _("Record the conference call")?></span></a></td> … … 332 375 </td> 333 376 </tr> 334 377 <?php } ?> 335 378 <?php //Begin Maximum Participants Code ?> 336 379 <tr>
