Changeset 12961
- Timestamp:
- 11/15/11 08:07:36 (2 years ago)
- Files:
-
- modules/branches/2.10/conferences/functions.inc.php (modified) (2 diffs)
- modules/branches/2.10/conferences/install.php (modified) (1 diff)
- modules/branches/2.10/conferences/page.conferences.php (modified) (7 diffs)
- modules/branches/2.10/paging/agi-bin/page.agi (modified) (1 diff)
- modules/branches/2.10/paging/functions.inc.php (modified) (4 diffs)
- modules/branches/2.10/paging/module.xml (modified) (1 diff)
- modules/branches/2.10/paging/page.paging.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.10/conferences/functions.inc.php
r12324 r12961 84 84 */ 85 85 function conferences_get_config($engine) { 86 global $ext; // is this the best way to pass this? 87 global $conferences_conf; 88 global $version; 89 global $amp_conf; 90 global $astman; 86 global $ext, $conferences_conf, $version, $amp_conf, $astman; 91 87 92 88 $ast_ge_162 = version_compare($version, '1.6.2', 'ge'); 93 // Default to conference meetme94 $confapp = 'ext_meetme';95 if ($ast_ge_162 && $amp_conf['AMPENGINE'] == 'asterisk' && isset($astman) && $astman->connected()) {96 //check for meetme application and fallback to confbridge if possible97 $app = $astman->send_request('Command', array('Command' => 'module show like meetme'));98 if (preg_match('/[1-9] modules loaded/', $app['data'])){99 $confapp='ext_meetme';100 } else {101 $app = $astman->send_request('Command', array('Command' => 'module show like confbridge'));102 if (preg_match('/[1-9] modules loaded/', $app['data'])){103 $confapp='ext_confbridge';104 }105 }106 }107 89 108 90 switch($engine) { … … 122 104 $ext->add($contextname, 'STARTMEETME', '', new ext_setvar('GROUP(meetme)','${MEETME_ROOMNUM}')); 123 105 $ext->add($contextname, 'STARTMEETME', '', new ext_gotoif('$[${MAX_PARTICIPANTS} > 0 && ${GROUP_COUNT(${MEETME_ROOMNUM}@meetme)}>${MAX_PARTICIPANTS}]','MEETMEFULL,1')); 124 if ($confapp != 'ext_confbridge') { 125 $ext->add($contextname, 'STARTMEETME', '', new ext_meetme('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 126 } else { 127 $ext->add($contextname, 'STARTMEETME', '', new ext_confbridge('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 128 } 106 $ext->add($contextname, 'STARTMEETME', '', new ext_meetme('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}')); 107 129 108 $ext->add($contextname, 'STARTMEETME', '', new ext_hangup('')); 130 109 modules/branches/2.10/conferences/install.php
r11109 r12961 115 115 out(_("already present")); 116 116 } 117 118 117 119 ?> modules/branches/2.10/conferences/page.conferences.php
r12445 r12961 80 80 $astver = $engineinfo['version']; 81 81 } 82 $ast_ge_162 = version_compare($astver, '1.6.2', 'ge');83 // Default to conference meetme84 $confapp = 'ext_meetme';85 if ($ast_ge_162 && $amp_conf['AMPENGINE'] == 'asterisk' && isset($astman) && $astman->connected()) {86 //check for meetme application and fallback to confbridge if possible87 $app = $astman->send_request('Command', array('Command' => 'module show like meetme'));88 if (preg_match('/[1-9] modules loaded/', $app['data'])){89 $confapp='ext_meetme';90 } else {91 $app = $astman->send_request('Command', array('Command' => 'module show like confbridge'));92 if (preg_match('/[1-9] modules loaded/', $app['data'])){ $confapp='ext_confbridge';93 }94 }95 }96 82 97 83 //get meetme rooms … … 232 218 $engineinfo = engine_getinfo(); 233 219 $astver = $engineinfo['version']; 234 235 //If the application is confbridge remove options that aren't supported 236 if ($confapp=='ext_confbridge') { 237 str_replace("o","",$options); 238 str_replace("T","",$options); 239 } 240 241 if (version_compare($astver, '1.4', 'ge') && $confapp=='ext_meetme') { 220 if (version_compare($astver, '1.4', 'ge') && $amp_conf['ASTCONFAPP']=='app_meetme') { 242 221 ?> 243 222 <tr> … … 273 252 </tr> 274 253 <?php 275 } 276 ?> 254 } else {//when using confbridge, hide option, but save it anyway 255 echo '<input type="hidden" name="opt#T" value="' . (strpos($options, "T") !== false ? 'T' : '') . '"'; 256 echo '<input type="hidden" name="opt#o" value="' . (strpos($options, "o") !== false ? 'o' : '') . '"'; 257 }?> 277 258 <tr> 278 259 <td><a href="#" class="info"><?php echo _("Quiet Mode:")?><span><?php echo _("Quiet mode (do not play enter/leave sounds)")?></span></a></td> … … 300 281 </tr> 301 282 <?php 302 //If the application is confbridge remove options that aren't supported 303 if ($confapp=='ext_confbridge') { 304 str_replace("i","",$options); 305 } 306 if ($confapp=='ext_meetme') { 283 if ($amp_conf['ASTCONFAPP']=='app_meetme') { 307 284 ?> 308 285 <tr> … … 318 295 </td> 319 296 </tr> 320 <?php } ?> 297 <?php } else {//when using confbridge, hide option, but save it anyway 298 echo '<input type="hidden" name="opt#i" value="' . (strpos($options, "i") !== false ? 'i' : '') . '"'; 299 }?> 321 300 <tr> 322 301 <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> … … 370 349 </tr> 371 350 <?php 372 //If the application is confbridge remove options that aren't supported 373 if ($confapp=='ext_confbridge') { 374 str_replace("r","",$options); 375 } 376 if ($confapp=='ext_meetme') { 351 if ($amp_conf['ASTCONFAPP'] == 'app_meetme') { 377 352 ?> 378 353 <tr> … … 388 363 </td> 389 364 </tr> 390 <?php } ?> 365 <?php } else {//when using confbridge, hide option, but save it anyway 366 echo '<input type="hidden" name="opt#r" value="' . (strpos($options, "r") !== false ? 'r' : '') . '"'; 367 }?> 391 368 <?php //Begin Maximum Participants Code ?> 392 369 <tr> modules/branches/2.10/paging/agi-bin/page.agi
r12942 r12961 29 29 'Async' => 'true', 30 30 'Set' => 'AMPUSER=' . $vars['AMPUSER'], 31 'Application' => 'meetme',31 'Application' => ($amp_conf['ASTCONFAPP'] == 'meetme' ? 'meetme' : 'confbridge'), 32 32 'Data' => $vars['meetmeopts'] 33 33 )); modules/branches/2.10/paging/functions.inc.php
r12942 r12961 423 423 424 424 //if page group it in use, got to busy 425 $ext->add($apppaging, $grp, ' ',425 $ext->add($apppaging, $grp, 'busy-check', 426 426 new ext_gotoif('$[${TRYLOCK(apppaging'. $grp .')}]', '', 'busy')); 427 427 … … 432 432 $ext->add($apppaging, $grp, '', new ext_answer('')); 433 433 $ext->add($apppaging, $grp, '', new ext_set('PAGE_CONF', '${EPOCH}${RAND(100,999)}')); 434 $page_opts = $amp_conf['ASTCONFAPP'] == 'app_meetme' ? '1doqsx' : '1qs'; 434 435 $ext->add($apppaging, $grp, '', 435 new ext_set('PAGE_CONF_OPTS', '1doqsx'. (!$thisgroup['duplex'] ? 'm' : '')));436 new ext_set('PAGE_CONF_OPTS', $page_opts . (!$thisgroup['duplex'] ? 'm' : ''))); 436 437 $ext->add($apppaging, $grp, 'agi', new ext_agi('page.agi,' 437 438 . 'extensions=' . implode(':',$page_memebers) . ',' … … 446 447 }*/ 447 448 unset($page_memebers); 448 $ext->add($apppaging, $grp, 'page', new ext_meetme('${PAGE_CONF} ,doqwxCAG(beep)'));449 $ext->add($apppaging, $grp, 'page', new ext_meetme('${PAGE_CONF}', 'doqwxAG(beep)')); 449 450 $ext->add($apppaging, $grp, '', new ext_hangup()); 450 451 $ext->add($apppaging, $grp, 'busy', new ext_set('PAGE${PAGEGROUP}BUSY', 'TRUE')); … … 555 556 $sql = "SELECT * FROM paging_config WHERE page_group='$grp'"; 556 557 $results = $db->getRow($sql, DB_FETCHMODE_ASSOC); 557 if( DB::IsError($results)) {558 $results = null;558 if(!$results || DB::IsError($results)) { 559 return false; 559 560 } 560 561 $sql = "SELECT * FROM admin WHERE variable='default_page_grp' AND value='$grp'"; modules/branches/2.10/paging/module.xml
r12942 r12961 3 3 <repo>standard</repo> 4 4 <name>Paging and Intercom</name> 5 <version>2.10.0. 1</version>5 <version>2.10.0.2</version> 6 6 <publisher>FreePBX</publisher> 7 7 <license>GPLv2+</license> 8 8 <category>Applications</category> 9 9 <changelog> 10 *2.10.0.1 * #72910 *2.10.0.1-2* #729 11 11 *2.10.0.0* new version changes 12 12 *2.9.0.5* #5000 modules/branches/2.10/paging/page.paging.php
r12942 r12961 114 114 } 115 115 116 $delURL = $_SERVER['PHP_SELF']."? type=${type}&display=${display}&action=delete&extdisplay=${xtn}";116 $delURL = $_SERVER['PHP_SELF']."?display=${display}&action=delete&extdisplay=${xtn}"; 117 117 $tlabel = sprintf(_("Delete Group %s"),$xtn); 118 118 $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/core_delete.png"/> '.$tlabel.'</span>'; … … 252 252 echo "<div class='rnav'><ul>\n"; 253 253 echo "<li><a id='".($extdisplay==''?'current':'std')."' "; 254 echo "href='config.php? type=${type}&display=${display}&action=add'>"._("Add Paging Group")."</a></li>";254 echo "href='config.php?display=${display}&action=add'>"._("Add Paging Group")."</a></li>"; 255 255 //get the list of paging groups 256 256 $presults = paging_list(); … … 264 264 $hl = $group == $default_grp ? _(' [DEFAULT]') : ''; 265 265 echo "<li><a class=\"".($extdisplay==$group ? 'current':'std'); 266 echo "\" href=\"config.php? type=${type}&display=";266 echo "\" href=\"config.php?display="; 267 267 echo "${display}&extdisplay=${group}&action=modify\">"; 268 268 echo $group." ".((trim($grouparr['description']) != '')?htmlspecialchars($grouparr['description']):_("Page Group"))."$hl</a></li>";
