Changeset 9137
- Timestamp:
- 03/11/10 20:10:38 (2 years ago)
- Files:
-
- modules/branches/2.8 (modified) (1 prop)
- modules/branches/2.8/callforward/functions.inc.php (modified) (7 diffs)
- modules/branches/2.8/callforward/module.xml (modified) (2 diffs)
- modules/branches/2.8/core/agi-bin/dialparties.agi (modified) (1 diff)
- modules/branches/2.8/core/functions.inc.php (modified) (6 diffs)
- modules/branches/2.8/core/module.xml (modified) (1 diff)
- modules/branches/2.8/fax/functions.inc.php (modified) (8 diffs)
- modules/branches/2.8/fax/install.php (modified) (1 diff)
- modules/branches/2.8/fax/module.xml (modified) (2 diffs)
- modules/branches/2.8/fax/page.fax.php (modified) (2 diffs)
- modules/branches/2.8/music/functions.inc.php (modified) (1 diff)
- modules/branches/2.8/music/module.xml (modified) (2 diffs)
- modules/branches/2.8/music/page.music.php (modified) (1 diff)
- modules/branches/2.8/queues/module.xml (modified) (3 diffs)
- modules/branches/2.8/queues/page.queues.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.8
- Property svnmerge-integrated changed from /modules/branches/2.7:1-9074 to /modules/branches/2.7:1-9136
modules/branches/2.8/callforward/functions.inc.php
r8833 r9137 22 22 global $ext; 23 23 global $amp_conf; 24 global $version; 25 global $DEVSTATE; 24 26 switch($engine) { 25 27 case "asterisk": … … 29 31 $ext->addGlobal('CFDEVSTATE','TRUE'); 30 32 } 33 $DEVSTATE = version_compare($version, "1.6", "ge") ? "DEVICE_STATE" : "DEVSTATE"; 34 31 35 if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) { 32 36 foreach($featurelist as $item) { … … 75 79 global $ext; 76 80 global $amp_conf; 77 global $version; 78 79 $DEVSTATE = version_compare($version, "1.6", "ge") ? "DEVICE_STATE" : "DEVSTATE"; 81 global $DEVSTATE; 80 82 81 83 $id = "app-cf-toggle"; // The context to be included … … 141 143 function callforward_cfon($c) { 142 144 global $ext; 145 global $amp_conf; 146 global $DEVSTATE; 143 147 144 148 $id = "app-cf-on"; // The context to be included … … 164 168 } 165 169 if ($amp_conf['FCBEEPONLY']) { 166 $ext->add($id, $c, 'hook_ 2', new ext_playback('beep')); // $cmd,n,Playback(...)170 $ext->add($id, $c, 'hook_1', new ext_playback('beep')); // $cmd,n,Playback(...) 167 171 } else { 168 172 $ext->add($id, $c, 'hook_1', new ext_playback('call-fwd-unconditional&for&extension')); … … 209 213 function callforward_cfoff_any($c) { 210 214 global $ext; 215 global $amp_conf; 216 global $DEVSTATE; 211 217 212 218 $id = "app-cf-off-any"; // The context to be included … … 245 251 function callforward_cfoff($c) { 246 252 global $ext; 253 global $amp_conf; 254 global $DEVSTATE; 247 255 248 256 $id = "app-cf-off"; // The context to be included modules/branches/2.8/callforward/module.xml
r8979 r9137 2 2 <rawname>callforward</rawname> 3 3 <name>Call Forward</name> 4 <version>2.7.0. 1</version>4 <version>2.7.0.3</version> 5 5 <publisher>FreePBX</publisher> 6 6 <license>GPLv2+</license> 7 7 <changelog> 8 *2.7.0.3* #4105 again 9 *2.7.0.2* #4103, #4104, #4105 8 10 *2.7.0.1* localizations 9 11 *2.7.0.0* #4047 CF toggle + devstate and hint additions … … 22 24 <type>setup</type> 23 25 <category>Internal Options & Configuration</category> 24 <location>release/2.7/callforward-2.7.0. 1.tgz</location>25 <md5sum> 6b7f6233fb6601df656a09718420e1a7</md5sum>26 <location>release/2.7/callforward-2.7.0.2.tgz</location> 27 <md5sum>0aa4cdc91da096bb87241d2d853d7ce6</md5sum> 26 28 </module> modules/branches/2.8/core/agi-bin/dialparties.agi
r8708 r9137 570 570 foreach ($extarray as $k ) { 571 571 // we loop through the original array to get the extensions in order of importance 572 if ( $ext_hunt[$k]) {572 if (isset($ext_hunt[$k]) && $ext_hunt[$k]) { 573 573 //If the original array is included in the extension hash then set variables 574 574 $myhuntmember="HuntMember"."$loops"; modules/branches/2.8/core/functions.inc.php
r9133 r9137 184 184 $ver12 = true; 185 185 } 186 if (version_compare($ast_version, "1.6", "ge")) { 187 $faxdetect = "faxdetect=no\n"; 188 $ver16 = true; 189 } else { 190 $faxdetect = ""; 191 $ver16 = false; 192 } 186 193 187 194 $sql = "SELECT keyword,data from $table_name where id=-1 and keyword <> 'account' and flags <> 1"; … … 310 317 $output .= $call_limit; 311 318 } 319 if ($faxdetect) { 320 $output .= $faxdetect; 321 } 312 322 } 313 323 $output .= $additional."\n"; … … 372 382 break; 373 383 case 'requirecalltoken': 374 if ($option != '')375 $additional .= $result['keyword']."=$option\n";376 break;384 if ($option != '') 385 $additional .= $result['keyword']."=$option\n"; 386 break; 377 387 default: 378 388 $additional .= $result['keyword']."=$option\n"; … … 447 457 break; 448 458 case 'requirecalltoken': 449 if ($option != '')450 $output .= $result2['keyword']."=".$result2['data']."\n";451 break;459 if ($option != '') 460 $output .= $result2['keyword']."=".$result2['data']."\n"; 461 break; 452 462 case 'record_in': 453 463 case 'record_out': … … 480 490 break; 481 491 default: 482 if ($call_limit) {483 $output .= $call_limit;484 }485 492 } 486 493 $output .= $additional."\n"; … … 1499 1506 $ext->add($context, $exten, 'Group', new ext_set('LOOPCNT','${FIELDQTY(ARG1,-)}')); 1500 1507 $ext->add($context, $exten, '', new ext_set('ITER','1')); 1501 $ext->add($context, $exten, 'begin', new ext_set('RECSET','"${DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording)}"')); 1502 $ext->add($context, $exten, '', new ext_gotoif('$["${RECSET}"="" | "${CUT(RECSET,\\\\\|,2):3}" != "Always"]', 'continue')); 1503 $ext->add($context, $exten, '', new ext_set('TEXTEN','${CUT(ARG1,-,${ITER})')); 1508 $ext->add($context, $exten, 'begin', new ext_gotoif('$["${CUT(DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording),=,3)}" != "Always"]', 'continue')); 1509 $ext->add($context, $exten, '', new ext_set('TEXTEN','${CUT(ARG1,-,${ITER})}')); 1504 1510 $ext->add($context, $exten, '', new ext_noop('Recording enable for ${TEXTEN}')); 1505 1511 $ext->add($context, $exten, '', new ext_set('CALLFILENAME','g${TEXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID}')); modules/branches/2.8/core/module.xml
r9133 r9137 10 10 <canuninstall>no</canuninstall> 11 11 <changelog> 12 *2.8.0.0beta1.0* #41 10 New Outbound Routing Schema and features12 *2.8.0.0beta1.0* #4100, #4102, #4110 New Outbound Routing Schema and features 13 13 *2.7.0.2* really fix #4092 14 14 *2.7.0.1* #4093, #4094, #4095, #4092 modules/branches/2.8/fax/functions.inc.php
r9075 r9137 200 200 201 201 function fax_get_config($engine){ 202 global $version; 202 global $version; 203 global $ext; 204 global $amp_conf; 205 global $core_conf; 203 206 204 207 $fax=fax_detect($version); 205 208 if($fax['module']){ //dont continue unless we have a fax module in asterisk 206 global $ext;207 global $amp_conf;208 global $core_conf;209 210 $ast_ge_16= version_compare($version, '1.6', 'ge');211 if ($ast_ge_16 && isset($core_conf) && is_a($core_conf, "core_conf")) {212 $core_conf->addSipGeneral('faxdetect','yes');213 }214 209 215 210 $context='ext-fax'; … … 220 215 $exten=$row['user']; 221 216 $ext->add($context, $exten, '', new ext_noop('Receiving Fax for: '.$row['name'].' ('.$row['user'].'), From: ${CALLERID(all)}')); 222 $ext->add($context, $exten, '', new ext_set('FAX_RX_EMAIL', '"'.$row['faxemail'].'"'));217 $ext->add($context, $exten, '', new ext_set('FAX_RX_EMAIL', $row['faxemail'])); 223 218 $ext->add($context, $exten, '', new ext_goto('receivefax','s')); 224 219 } … … 256 251 $ext->add($context, $exten, '', new ext_execif('$["${FAXOPT(error)}"=""]','Set','FAXSTATUS=FAILED LICENSE EXCEEDED')); 257 252 $ext->add($context, $exten, '', new ext_execif('$["${FAXOPT(error)}"!="" && "${FAXOPT(error)}"!="NO_ERROR"]','Set','FAXSTATUS="FAILED FAXOPT: error: ${FAXOPT(error)} status: ${FAXOPT(status)} statusstr: ${FAXOPT(statusstr)}"')); 258 $ext->add($context, $exten, '', new ext_ goto('1','h'));253 $ext->add($context, $exten, '', new ext_hangup()); 259 254 260 255 break; … … 266 261 $exten = 'h'; 267 262 $ext->add($context, $exten, '', new ext_gotoif('$["${FAXSTATUS:0:6}" = "FAILED"]', 'failed')); 268 $ext->add($context, $exten, 'process', new ext_gotoif('$[ "${FAX_RX_EMAIL}" = ""]','end'));263 $ext->add($context, $exten, 'process', new ext_gotoif('$[${LEN(${FAX_RX_EMAIL})} = 0]','end')); 269 264 $ext->add($context, $exten, '', new ext_system('${ASTVARLIBDIR}/bin/fax-process.pl --to ${FAX_RX_EMAIL} --from "'.$sender_address['0'].'" --dest "${FROM_DID}" --subject "New fax from ${URIENCODE(${CALLERID(name)})} ${URIENCODE(<${CALLERID(number)}>)}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); 270 265 … … 273 268 $ext->add($context, $exten, '', new ext_macro('hangupcall')); 274 269 275 $ext->add('ext-did-0001', 'fax', '', new ext_goto('${FAX_DEST}'));276 $ext->add('ext-did-0002', 'fax', '', new ext_goto('${FAX_DEST}'));277 278 // Add fax extension to ivr and announcement as inbound controle may be passed quickly to them and still detection is desired279 if (function_exists('ivr_list')) {280 $ivrlist = ivr_list();281 if(is_array($ivrlist)) foreach($ivrlist as $item) {282 $ext->add("ivr-".$item['ivr_id'], 'fax', '', new ext_goto('${FAX_DEST}'));283 }284 }285 if (function_exists('announcement_list')) foreach (announcement_list() as $row) {286 $ext->add('app-announcement-'.$row['announcement_id'], 'fax', '', new ext_goto('${FAX_DEST}'));287 }288 270 289 271 //write out res_fax.conf and res_fax_digium.conf … … 301 283 $ext->add('app-fax', $fc_simu_fax, '', new ext_goto('1', 's', 'ext-fax')); 302 284 $ext->add('app-fax', 'h', '', new ext_macro('hangupcall')); 285 } 286 // This is not really needed but is put here in case some ever accidently switches the order below when 287 // checking for this setting since $fax['module'] will be set there and the 2nd part never checked 288 $fax_settings['force_detection'] = 'yes'; 289 } else { 290 $fax_settings=fax_get_settings(); 291 } 292 if ($fax['module'] | $fax_settings['force_detection'] == 'yes') { //dont continue unless we have a fax module in asterisk 293 $ast_ge_16= version_compare($version, '1.6', 'ge'); 294 if ($ast_ge_16 && isset($core_conf) && is_a($core_conf, "core_conf")) { 295 $core_conf->addSipGeneral('faxdetect','yes'); 296 } 297 298 $ext->add('ext-did-0001', 'fax', '', new ext_goto('${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)}')); 299 $ext->add('ext-did-0002', 'fax', '', new ext_goto('${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)}')); 300 301 // Add fax extension to ivr and announcement as inbound controle may be passed quickly to them and still detection is desired 302 if (function_exists('ivr_list')) { 303 $ivrlist = ivr_list(); 304 if(is_array($ivrlist)) foreach($ivrlist as $item) { 305 $ext->add("ivr-".$item['ivr_id'], 'fax', '', new ext_goto('${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)}')); 306 } 307 } 308 if (function_exists('announcement_list')) foreach (announcement_list() as $row) { 309 $ext->add('app-announcement-'.$row['announcement_id'], 'fax', '', new ext_goto('${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)}')); 303 310 } 304 311 } … … 465 472 global $version; 466 473 $fax=fax_detect($version); 467 if($fax['module']){ //dont continue unless we have a fax module in asterisk 474 if ($fax['module']) { 475 $fax_settings['force_detection'] = 'yes'; 476 } else { 477 $fax_settings=fax_get_settings(); 478 } 479 if($fax_settings['force_detection'] == 'yes'){ //dont continue unless we have a fax module in asterisk 468 480 global $ext; 469 481 global $engine; … … 486 498 } 487 499 if ($route['legacy_email'] === null) { 488 $ext->splice($context, $extension, 'dest-ext', new ext_setvar('FAX_DEST', '"'.$route['destination'].'"'));500 $ext->splice($context, $extension, 'dest-ext', new ext_setvar('FAX_DEST',str_replace(',','^',$route['destination']))); 489 501 } else { 490 $ext->splice($context, $extension, 'dest-ext', new ext_setvar('FAX_DEST',' "ext-fax,s,1"'));502 $ext->splice($context, $extension, 'dest-ext', new ext_setvar('FAX_DEST','ext-fax^s^1')); 491 503 if ($route['legacy_email']) { 492 504 $fax_rx_email = $route['legacy_email']; modules/branches/2.8/fax/install.php
r9075 r9137 92 92 if(!$set['ecm']){$sql[]='REPLACE INTO fax_details (`key`, `value`) VALUES ("ecm","yes")';} 93 93 if(!$set['legacy_mode']){$sql[]='REPLACE INTO fax_details (`key`, `value`) VALUES ("legacy_mode","no")';} 94 94 if(!$set['force_detection']){$sql[]='REPLACE INTO fax_details (`key`, `value`) VALUES ("force_detection","no")';} 95 95 96 foreach ($sql as $statement){ 96 97 $check = $db->query($statement); modules/branches/2.8/fax/module.xml
r9077 r9137 2 2 <rawname>fax</rawname> 3 3 <name>Fax Configuration</name> 4 <version>2.7.0.1 5</version>4 <version>2.7.0.17</version> 5 5 <publisher>Schmoozecom.com</publisher> 6 6 <license>GPLv2+</license> … … 12 12 <description>Adds configurations, options and GUI for inbound faxing</description> 13 13 <changelog> 14 *2.7.0.17* #4099 15 *2.7.0.16* #4101, #4112, #4113 14 16 *2.7.0.15* #4096 (workaround for Asterisk bug in 1.6.2) 15 17 *2.7.0.14* #4090 modules/branches/2.8/fax/page.fax.php
r9075 r9137 23 23 } 24 24 $fax['legacy_mode'] = isset($_REQUEST['legacy_mode']) ? $_REQUEST['legacy_mode'] : 'no'; 25 $fax['force_detection'] = isset($_REQUEST['force_detection']) ? $_REQUEST['force_detection'] : 'no'; 25 26 fax_save_settings($fax); 26 27 }else{ 27 28 $fax=fax_get_settings(); 28 29 $fax['legacy_mode'] = isset($fax['legacy_mode']) ? $fax['legacy_mode'] : 'no'; 30 $fax['force_detection'] = isset($fax['force_detection']) ? $fax['force_detection'] : 'no'; 29 31 $action='';//no action to do 30 32 } 33 $fax_detect=fax_detect(); 31 34 ?> 32 35 … … 123 126 <input type="radio" name="legacy_mode" value="no" <?php echo (($fax['legacy_mode'] == 'no')?'checked':''); ?> tabindex="<?php echo ++$tabindex;?>"><?php echo _("No")?></td> 124 127 </tr> 128 129 <?php if(!$fax_detect['module']){ ?> 130 <tr> 131 <td><a href="#" class="info"><?php echo _("Always Generate Detection Code")?>:<span><?php echo _("When no fax modules are detected the module will not generate any detection dialplan by default. If the system is being used with phyical FAX devices, hylafax + iaxmodem, or other outside fax setups you can force the dialplan to be generated here.")?></span></a></td> 132 <td><input type="radio" name="force_detection" value="yes" <?php echo (($fax['force_detection'] == 'yes')?'checked':''); ?> tabindex="<?php echo ++$tabindex;?>"><?php echo _("Yes")?> 133 <input type="radio" name="force_detection" value="no" <?php echo (($fax['force_detection'] == 'no')?'checked':''); ?> tabindex="<?php echo ++$tabindex;?>"><?php echo _("No")?></td> 134 </tr> 135 <?php } ?> 125 136 </tbody> 126 137 </table> 127 138 <br /> 128 139 129 130 140 <input type="hidden" value="fax" name="display"/> 131 141 <input type="hidden" name="action" value="edit"> modules/branches/2.8/music/functions.inc.php
r8845 r9137 8 8 $amp_conf['MOHDIR'] = '/mohmp3'; 9 9 } 10 $path = $amp_conf['ASTVARLIBDIR']. $amp_conf['MOHDIR'];10 $path = $amp_conf['ASTVARLIBDIR'].'/'.$amp_conf['MOHDIR']; 11 11 } 12 12 $i = 1; modules/branches/2.8/music/module.xml
r9078 r9137 2 2 <rawname>music</rawname> 3 3 <name>Music on Hold</name> 4 <version>2.7.0. 2</version>4 <version>2.7.0.3</version> 5 5 <publisher>FreePBX</publisher> 6 6 <license>GPLv2+</license> … … 11 11 <description>Uploading and management of sound files (wav, mp3) to be used for on-hold music.</description> 12 12 <changelog> 13 *2.7.0.3* #4111 13 14 *2.7.0.2* #4087 14 15 *2.7.0.1* text tweaks modules/branches/2.8/music/page.music.php
r8943 r9137 21 21 22 22 // Determine default path to music directory, old default was mohmp3, now settable 23 $path_to_moh_dir = $amp_conf['ASTVARLIBDIR']. $amp_conf['MOHDIR'];23 $path_to_moh_dir = $amp_conf['ASTVARLIBDIR'].'/'.$amp_conf['MOHDIR']; 24 24 25 25 modules/branches/2.8/queues/module.xml
r8977 r9137 2 2 <rawname>queues</rawname> 3 3 <name>Queues</name> 4 <version>2.7.0. 0</version>4 <version>2.7.0.2</version> 5 5 <publisher>FreePBX</publisher> 6 6 <license>GPLv2+</license> … … 11 11 </description> 12 12 <changelog> 13 *2.7.0.2* #4120 again fixed typo in variable name 14 *2.7.0.1* #4120, spelling typo 13 15 *2.7.0.0* #4084, spelling, tooltips changes, localizations 14 16 *2.7.0beta1.5* #4084, #4068 (support for experimental dial-one) … … 59 61 <queues needsenginedb="yes">Queues</queues> 60 62 </menuitems> 61 <location>release/2.7/queues-2.7.0. 0.tgz</location>62 <md5sum> 845b60da3aa54490e5d9968f75dedde7</md5sum>63 <location>release/2.7/queues-2.7.0.2.tgz</location> 64 <md5sum>4c20585b3eed5ef40e0d7bae2cca31b3</md5sum> 63 65 </module> modules/branches/2.8/queues/page.queues.php
r9107 r9137 207 207 break; 208 208 } 209 $mem_array[] = $ _exten_prefix.$matches[2].','.$matches[3];209 $mem_array[] = $exten_prefix.$matches[2].','.$matches[3]; 210 210 } 211 211 }
