Changeset 11425
- Timestamp:
- 02/16/11 00:28:45 (2 years ago)
- Files:
-
- modules/branches/2.9/parking/functions.inc.php (modified) (8 diffs)
- modules/branches/2.9/parking/page.parking.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/parking/functions.inc.php
r10920 r11425 14 14 15 15 switch($engine) { 16 case "asterisk": 16 case "asterisk": 17 18 $ast_lt_16 = version_compare($version,'1.6','lt'); 19 $ast_lt_162 = version_compare($version,'1.6.2','lt'); 20 $ast_ge_18 = version_compare($version,'1.8','ge'); 17 21 18 22 $contextname = 'park-dial'; … … 31 35 $parkcid = isset($results['parkcid'])?$results['parkcid']:''; 32 36 $parkingannmsg_id = isset($results['parkingannmsg_id'])?$results['parkingannmsg_id']:''; 33 $goto = isset($results['goto'])?$results['goto']:'from-pstn,s,1'; 37 $goto = isset($results['goto'])?$results['goto']:''; 38 39 $parkinghints = isset($results['parkinghints'])?$results['parkinghints']:'no'; 34 40 35 41 $parkpos1 = $parkext + 1; … … 48 54 } 49 55 50 // Now generate dialplan51 $ext->add($contextname, "t", '', new ext_noop('Parked Call Timed Out and Got Orphaned'));52 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_noop('Parked Call Timed Out and Got Orphaned'));53 54 56 // If we have an appropriate Asterisk patch, set paraemters for Asterisk 55 57 // 56 if ( isset($amp_conf["PARKINGPATCH"]) && strtolower($amp_conf["PARKINGPATCH"]) == 'true') {58 if ($amp_conf["PARKINGPATCH"] && $ast_lt_16) { 57 59 if ($parkalertinfo) { 58 60 $core_conf->addFeatureGeneral('parkreturnalertinfo',$parkalertinfo); … … 61 63 $core_conf->addFeatureGeneral('parkreturncidprefix',$parkcid); 62 64 } 63 // No patch, do the default for orphaned calls 64 } else { 65 // Now generate dialplan 66 $ext->add($contextname, "t", '', new ext_noop('Parked Call Timed Out and Got Orphaned')); 67 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_noop('Parked Call Timed Out and Got Orphaned')); 68 69 if ($parkingannmsg_id != '') { 70 $parkingannmsg = recordings_get_file($parkingannmsg_id); 71 $ext->add($contextname, "t", '', new ext_playback($parkingannmsg)); 72 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_playback($parkingannmsg)); 73 } 74 75 } else if ($ast_lt_18) { 76 65 77 if ($parkalertinfo) { 66 $ext->add($contextname, "t", '', new ext_ setvar('__ALERT_INFO',str_replace(';', '\;', $parkalertinfo)));67 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_ setvar('__ALERT_INFO',str_replace(';', '\;', $parkalertinfo)));78 $ext->add($contextname, "t", '', new ext_alertinfo(str_replace(';', '\;', $parkalertinfo))); 79 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_alertinfo(str_replace(';', '\;', $parkalertinfo))); 68 80 } 69 81 if ($parkcid) { … … 71 83 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_setvar('CALLERID(name)', $parkcid.'${CALLERID(name)}')); 72 84 } 73 } 74 75 if ($parkingannmsg_id != '') { 76 $parkingannmsg = recordings_get_file($parkingannmsg_id); 77 $ext->add($contextname, "t", '', new ext_playback($parkingannmsg)); 78 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_playback($parkingannmsg)); 79 } 80 // goto the destination here 81 // 82 $ext->add($contextname, "t", '', new ext_goto($goto)); 83 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_goto($goto)); 85 if ($parkingannmsg_id != '') { 86 $parkingannmsg = recordings_get_file($parkingannmsg_id); 87 $ext->add($contextname, "t", '', new ext_playback($parkingannmsg)); 88 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_playback($parkingannmsg)); 89 } 90 91 } else { 92 93 $parking_dest = isset($results['parking_dest'])?$results['parking_dest']:'device'; 94 95 // in 1.8 we never come back to the origin, we always run it through our processing and then send it 96 // either to the original caller through the generated context in park-dial, or to the default destination 97 // 98 $core_conf->addFeatureGeneral('comebacktoorigin','no'); 99 100 $core_conf->addFeatureGeneral('parkinghints',$parkinghints); 101 $core_conf->addFeatureGeneral('parkedplay',isset($results['parkedplay']) ? $results['parkedplay'] : 'both'); 102 $core_conf->addFeatureGeneral('parkedcalltransfers',isset($results['parkedcalltransfers']) ? $results['parkedcalltransfers'] : 'caller'); 103 $core_conf->addFeatureGeneral('parkedcallrepark',isset($results['parkedcallrepark']) ? $results['parkedcallrepark'] : 'caller'); 104 $core_conf->addFeatureGeneral('parkedcallhangup',isset($results['parkedcallhangup']) ? $results['parkedcallhangup'] : 'no'); 105 $core_conf->addFeatureGeneral('parkedcallrecording',isset($results['parkedcallrecording']) ? $results['parkedcallrecording'] : 'no'); 106 $core_conf->addFeatureGeneral('parkedmusicclass',isset($results['parkedmusicclass']) ? $results['parkedmusicclass'] : 'default'); 107 $core_conf->addFeatureGeneral('adsipark',isset($results['adsipark']) ? $results['adsipark'] : 'no'); 108 $core_conf->addFeatureGeneral('findslot',isset($results['findslot']) ? $results['findslot'] : 'first'); 109 110 $contextname = 'parkedcallstimeout'; 111 $exten = $parking_dest == 'dest' && $goto ? 's' : '_[0-9a-zA-Z*#].'; 112 if ($parkalertinfo) { 113 $ext->add($contextname, $exten, '', new ext_sipremoveheader('Alert-Info:')); 114 $ext->add($contextname, $exten, '', new ext_alertinfo(str_replace(';', '\;', $parkalertinfo))); 115 } 116 if ($parkcid) { 117 $ext->add($contextname, $exten, '', new ext_set('CALLERID(name)', $parkcid.'${CALLERID(name)}')); 118 } 119 if ($parkingannmsg_id != '') { 120 $parkingannmsg = recordings_get_file($parkingannmsg_id); 121 $ext->add($contextname, $exten, '', new ext_playback($parkingannmsg)); 122 } 123 $ext->add($contextname, $exten, '', new ext_goto($parking_dest == 'dest' && $goto ? $goto : 'park-dial,${EXTEN},1')); 124 } 125 126 // In all cases, add a timeout and catchall in the park-dial context to revert to the 127 // $goto destination if all else fails 128 // 129 $contextname = 'park-dial'; 130 if ($goto) { 131 $ext->add($contextname, "t", '', new ext_goto($goto)); 132 $ext->add($contextname, "_[0-9a-zA-Z*#].", '', new ext_goto($goto)); 133 } 134 84 135 85 136 // Asterisk 1.4 requires hints to be generated for parking 86 137 // 87 if (version_compare($version, "1.4", "ge")) { 88 $parkhints = 'park-hints'; 89 $ext->addInclude('from-internal-additional', $parkhints); // Add the include from from-internal 90 for ($slot = $parkpos1; $slot <= $parkpos2; $slot++) { 91 $ext->addHint($parkhints, $slot, "park:$slot@$parkingcontext"); 92 $ext->add($parkhints, $slot, '', new ext_parkedcall($slot)); 93 } 94 } 95 } 138 // TODO: parkinghints = yes 1.6.2+ 139 // 140 if ($ast_lt_162 && $parkinghints == 'yes') { 141 $parkhints = 'park-hints'; 142 $ext->addInclude('from-internal-additional', $parkhints); // Add the include from from-internal 143 for ($slot = $parkpos1; $slot <= $parkpos2; $slot++) { 144 $ext->addHint($parkhints, $slot, "park:$slot@$parkingcontext"); 145 $ext->add($parkhints, $slot, '', new ext_parkedcall($slot)); 146 } 147 } 96 148 break; 149 } 97 150 } 98 151 } 99 152 100 153 function parking_add($parkingenabled, $parkext, $numslots, $parkingtime, $parkingcontext, $parkalertinfo, $parkcid, $parkingannmsg_id, $goto) { 154 $pargs['parkingenabled'] = $parkingenabled; 155 $pargs['parkext'] = $parkext; 156 $pargs['numslots'] = $numslots; 157 $pargs['parkingtime'] = $parkingtime; 158 $pargs['parkingcontext'] = $parkingcontext; 159 $pargs['parkalertinfo'] = $parkalertinfo; 160 $pargs['parkcid'] = $parkcid; 161 $pargs['parkingannmsg_id'] = $parkingannmsg_id; 162 $pargs['goto'] = $goto; 163 164 return parking_update($pargs); 165 } 166 167 function parking_update($pargs) { 101 168 global $db; 169 global $amp_conf; 170 171 $ast_ge_18 = version_compare($amp_conf['ASTVERSION'],'1.8','ge'); 172 173 $parkingenabled = isset($pargs['parkingenabled']) ? $pargs['parkingenabled'] : ''; 174 $parkext = isset($pargs['parkext']) ? $pargs['parkext'] : '70'; 175 $numslots = isset($pargs['numslots']) ? $pargs['numslots'] : '8'; 176 $parkingtime = isset($pargs['parkingtime']) ? $pargs['parkingtime'] : '45'; 177 $parkingcontext = isset($pargs['parkingcontext']) ? $pargs['parkingcontext'] : 'parkedcalls'; 178 $parkalertinfo = isset($pargs['parkalertinfo']) ? $pargs['parkalertinfo'] : ''; 179 $parkcid = isset($pargs['parkcid']) ? $pargs['parkcid'] : ''; 180 $parkingannmsg_id = isset($pargs['parkingannmsg_id']) ? $pargs['parkingannmsg_id'] : ''; 181 $goto = isset($pargs['goto']) ? $pargs['goto'] : ''; 102 182 103 183 $parkinglot_id = 1; // only 1 parkinglot but prepare for future … … 117 197 $numslots = ctype_digit($numslots) ? $numslots : 8; 118 198 $parkingtime = ctype_digit($parkingtime) ? $parkingtime : ''; 119 $goto = ($goto) ? $goto : 'from-pstn,s,1';120 199 121 200 $parkfields = array(array($parkinglot_id, 'parkingenabled', "$parkingenabled"), … … 129 208 array($parkinglot_id, 'goto', "$goto")); 130 209 210 if ($ast_ge_18) { 211 $parkfields[] = array($parkinglot_id, 'parking_dest', isset($pargs['parking_dest'])?$pargs['parking_dest']:'device'); 212 $parkfields[] = array($parkinglot_id, 'parkinghints', isset($pargs['parkinghints'])?$pargs['parkinghints']:'yes'); 213 $parkfields[] = array($parkinglot_id, 'parkedplay', isset($pargs['parkedplay'])?$pargs['parkedplay']:'both'); 214 $parkfields[] = array($parkinglot_id, 'parkedcalltransfers', isset($pargs['parkedcalltransfers'])?$pargs['parkedcalltransfers']:'caller'); 215 $parkfields[] = array($parkinglot_id, 'parkedcallreparking', isset($pargs['parkedcallreparking'])?$pargs['parkedcallreparking']:'caller'); 216 $parkfields[] = array($parkinglot_id, 'parkedcallhangup', isset($pargs['parkedcallhangup'])?$pargs['parkedcallhangup']:'no'); 217 $parkfields[] = array($parkinglot_id, 'parkedcallrecording', isset($pargs['parkedcallrecording'])?$pargs['parkedcallrecording']:'no'); 218 $parkfields[] = array($parkinglot_id, 'parkedmusicclass', isset($pargs['parkedmusicclass'])?$pargs['parkedmusicclass']:'default'); 219 $parkfields[] = array($parkinglot_id, 'findslot', isset($pargs['findslot'])?$pargs['findslot']:'first'); 220 $parkfields[] = array($parkinglot_id, 'adsipark', isset($pargs['adsipark'])?$pargs['adsipark']:'no'); 221 } 222 131 223 $compiled = $db->prepare('INSERT INTO parkinglot (id, keyword, data) values (?,?,?)'); 132 224 … … 136 228 } 137 229 } 138 139 230 140 231 function parking_getconfig($parkinglot_id=1) { modules/branches/2.9/parking/page.parking.php
r8101 r11425 15 15 $tabindex = 0; 16 16 17 $action = isset($_REQUEST['action'])?$_REQUEST['action']:''; 18 19 isset($_REQUEST['parkingenabled'])?$parkingenabled=$_REQUEST['parkingenabled']:$parkingenabled=''; 20 isset($_REQUEST['parkext'])?$parkext = trim($_REQUEST['parkext']):$parkext='70'; 21 isset($_REQUEST['numslots'])?$numslots = trim($_REQUEST['numslots']):$numslots='8'; 22 isset($_REQUEST['parkingtime'])?$parkingtime = trim($_REQUEST['parkingtime']):$parkingtime='45'; 23 isset($_REQUEST['parkingcontext'])?$parkingcontext = trim($_REQUEST['parkingcontext']):$parkingcontext='parkedcalls'; 24 isset($_REQUEST['parkalertinfo'])?$parkalertinfo = trim($_REQUEST['parkalertinfo']):$parkalertinfo=''; 25 isset($_REQUEST['parkcid'])?$parkcid = trim($_REQUEST['parkcid']):$parkcid=''; 26 isset($_REQUEST['parkingannmsg_id'])?$parkingannmsg_id = trim($_REQUEST['parkingannmsg_id']):$parkingannmsg_id=''; 27 28 if (isset($_REQUEST['goto0']) && isset($_REQUEST[$_REQUEST['goto0']."0"])) { 29 $goto = $_REQUEST[$_REQUEST['goto0']."0"]; 17 $action = isset($_POST['action'])?$_POST['action']:''; 18 19 $parkingenabled = isset($_POST['parkingenabled']) ? $_POST['parkingenabled'] : ''; 20 $parkext = isset($_POST['parkext']) ? trim($_POST['parkext']) : '70'; 21 $numslots = isset($_POST['numslots']) ? trim($_POST['numslots']) : '8'; 22 $parkingtime = isset($_POST['parkingtime']) ? trim($_POST['parkingtime']) : '45'; 23 $parkingcontext = isset($_POST['parkingcontext']) ? trim($_POST['parkingcontext']) : 'parkedcalls'; 24 $parkalertinfo = isset($_POST['parkalertinfo']) ? trim($_POST['parkalertinfo']) : ''; 25 $parkcid = isset($_POST['parkcid']) ? trim($_POST['parkcid']) : ''; 26 $parkingannmsg_id = isset($_POST['parkingannmsg_id']) ? trim($_POST['parkingannmsg_id']) : ''; 27 $parkinghints = isset($_POST['parkinghints'])?$_POST['parkinghints']:'no'; 28 29 $ast_ge_18 = version_compare($amp_conf['ASTVERSION'],'1.8','ge'); 30 31 if ($ast_ge_18) { 32 $parking_dest = isset($_POST['parking_dest'])?$_POST['parking_dest']:'device'; 33 $parkedplay = isset($_POST['parkedplay'])?$_POST['parkedplay']:'both'; 34 $parkedcalltransfers = isset($_POST['parkedcalltransfers'])?$_POST['parkedcalltransfers']:'caller'; 35 $parkedcallreparking = isset($_POST['parkedcallreparking'])?$_POST['parkedcallreparking']:'caller'; 36 $parkedcallhangup = isset($_POST['parkedcallhangup'])?$_POST['parkedcallhangup']:'no'; 37 $parkedcallrecording = isset($_POST['parkedcallrecording'])?$_POST['parkedcallrecording']:'no'; 38 $parkedmusicclass = isset($_POST['parkedmusicclass'])?$_POST['parkedmusicclass']:'default'; 39 $findslot = isset($_POST['findslot'])?$_POST['findslot']:'first'; 40 $adsipark = isset($_POST['adsipark'])?$_POST['adsipark']:'no'; 41 } 42 43 if (isset($_POST['goto0']) && isset($_POST[$_POST['goto0']."0"])) { 44 $goto = $_POST[$_POST['goto0']."0"]; 30 45 } else { 31 46 $goto = ''; … … 33 48 34 49 // do if we are submitting a form 35 if(isset($_POST['action'])){ 50 if(isset($_POST['action'])){ 36 51 37 52 if ($action == 'edtPARKING') { 38 parking_add($parkingenabled, $parkext, $numslots, $parkingtime, $parkingcontext, $parkalertinfo, $parkcid, $parkingannmsg_id, $goto); 53 $pargs['parkingenabled'] = $parkingenabled; 54 $pargs['parkext'] = $parkext; 55 $pargs['numslots'] = $numslots; 56 $pargs['parkingtime'] = $parkingtime; 57 $pargs['parkingcontext'] = $parkingcontext; 58 $pargs['parkalertinfo'] = $parkalertinfo; 59 $pargs['parkcid'] = $parkcid; 60 $pargs['parkingannmsg_id'] = $parkingannmsg_id; 61 $pargs['goto'] = $goto; 62 $pargs['parkinghints'] = $parkinghints; 63 64 if ($ast_ge_18) { 65 $pargs['parking_dest'] = $parking_dest; 66 $pargs['parkedplay'] = $parkedplay; 67 $pargs['parkedcalltransfers'] = $parkedcalltransfers; 68 $pargs['parkedcallreparking'] = $parkedcallreparking; 69 $pargs['parkedcallhangup'] = $parkedcallhangup; 70 $pargs['parkedcallrecording'] = $parkedcallrecording; 71 $pargs['parkedmusicclass'] = $parkedmusicclass; 72 $pargs['findslot'] = $findslot; 73 $pargs['adsipark'] = $adsipark; 74 } 75 parking_update($pargs); 39 76 needreload(); 40 77 redirect_standard(); … … 97 134 </td> 98 135 </tr> 136 <?php 137 if ($ast_ge_18 && function_exists('music_list')) { 138 ?> 139 <tr> 140 <td><a href="#" class="info"><?php echo _("Parked Music Class:")?><span><?php echo _("This is the music class that will be played to a parked call while in the parking lot UNLESS the call flow prior to parking the call explicitly set a different music class, such as if the call came in through a queue or ring group.")?></span></a></td> 141 <td align="right"> 142 <select name="parkedmusicclass" tabindex="<?php echo ++$tabindex;?>"> 143 <?php 144 $tresults = music_list(); 145 $none = array_search('none',$tresults); 146 if ($none !== false) { 147 unset($tresults[$none]); 148 } 149 if (isset($tresults)) { 150 foreach ($tresults as $tresult) { 151 $searchvalue="$tresult"; 152 $ttext = $tresult; 153 if($tresult == 'default') $ttext = _("default"); 154 echo '<option value="'.$tresult.'" '.($searchvalue == $parkedmusicclass ? 'SELECTED' : '').'>'.$ttext; 155 } 156 } 157 ?> 158 </select> 159 </td> 160 </tr> 161 <?php 162 } 163 ?> 99 164 <tr> 100 165 <td><a href=# class="info"><?php echo _("Parking Lot Context:")?><span> … … 103 168 <td align=right><input type="text" size="19" name="parkingcontext" value="<?php echo htmlspecialchars($parkingcontext)?>" tabindex="<?php echo ++$tabindex;?>"/></td> 104 169 </tr> 170 171 <tr> 172 <td><a href=# class="info"><?php echo _("Enable BLF Capabilities:")?><span><?php echo _("Check this box to have Asterisk 'hints' generated to use with BLF buttons.")?></span></a></td> 173 <td align=right><input type="checkbox" value="yes" name="parkinghints" <?php echo ($parkinghints == 'yes' ? 'CHECKED' : '')?> tabindex="<?php echo ++$tabindex;?>"></td> 174 </tr> 175 <?php 176 if ($ast_ge_18) { 177 ?> 178 <tr> 179 <td><a href=# class="info"><?php echo _("Use Next Slot:")?><span><?php echo _("Asterisk: findslot. Check this box if you want the parking lot to seek the next sequential parking slot relative to the the last parked call instead of seeking the first available slot. Normally this box is left un-checked.")?></span></a></td> 180 <td align=right><input type="checkbox" value="yes" name="findslot" <?php echo ($findslot == 'yes' ? 'CHECKED' : '')?> tabindex="<?php echo ++$tabindex;?>"></td> 181 </tr> 182 <tr> 183 <td><a href=# class="info"><?php echo _("Enable ADSI Annoucements:")?><span><?php echo _("Check this box if you are using ADSI enabled analog phones and want to have ADSI parking annoucements sent to the phones. Other adsi.conf configurations may be neceesary for this to work.")?></span></a></td> 184 <td align=right><input type="checkbox" value="yes" name="adsipark" <?php echo ($adsipark == 'yes' ? 'CHECKED' : '')?> tabindex="<?php echo ++$tabindex;?>"></td> 185 </tr> 186 187 <tr><td colspan="2"><br><h5><?php echo _("Returned Call Behavior:")?><hr></h5></td></tr> 188 189 <tr> 190 <td><a href="#" class="info"><?php echo _("Pickup Courtesy Tone:")?><span><?php echo _("Whom to play the courtesy tone to when a parked call is retreived.")?></span></a></td> 191 <td> 192 <input type="radio" name="parkedplay" id="parkedplay-caller" value="caller" <?php echo $parkedplay == 'caller' ? "checked=\"yes\"" : ""?>/><label for="parkedplay-caller"><?php echo _("Caller") ?></label> 193 <input type="radio" name="parkedplay" id="parkedplay-parked" value="parked" <?php echo $parkedplay == 'parked' ? "checked=\"yes\"" : ""?>/><label for="parkedplay-parked"><?php echo _("Parked") ?></label> 194 <input type="radio" name="parkedplay" id="parkedplay-both" value="both" <?php echo $parkedplay == 'both' ? "checked=\"yes\"" : ""?>/><label for="parkedplay-both"><?php echo _("Both") ?></label> 195 </td> 196 </tr> 197 198 <tr> 199 <td><a href="#" class="info"><?php echo _("Transfer Capability:")?><span><?php echo _("Asterisk: parkedcalltransfers. Enables or disables DTMF based transfers when picking up a parked call.")?></span></a></td> 200 <td> 201 <input type="radio" name="parkedcalltransfers" id="parkedcalltransfers-caller" value="caller" <?php echo $parkedcalltransfers == 'caller' ? "checked=\"yes\"" : ""?>/><label for="parkedcalltransfers-caller"><?php echo _("Caller") ?></label> 202 <input type="radio" name="parkedcalltransfers" id="parkedcalltransfers-parked" value="parked" <?php echo $parkedcalltransfers == 'parked' ? "checked=\"yes\"" : ""?>/><label for="parkedcalltransfers-parked"><?php echo _("Parked") ?></label> 203 <input type="radio" name="parkedcalltransfers" id="parkedcalltransfers-both" value="both" <?php echo $parkedcalltransfers == 'both' ? "checked=\"yes\"" : ""?>/><label for="parkedcalltransfers-both"><?php echo _("Both") ?></label> 204 <input type="radio" name="parkedcalltransfers" id="parkedcalltransfers-no" value="no" <?php echo $parkedcalltransfers == 'no' ? "checked=\"yes\"" : ""?>/><label for="parkedcalltransfers-no"><?php echo _("Neither") ?></label> 205 </td> 206 </tr> 207 208 <tr> 209 <td><a href="#" class="info"><?php echo _("Re-Parking Capability:")?><span><?php echo _("Asterisk: parkedcallreparking. Enables or disables DTMF based parking when picking up a parked call.")?></span></a></td> 210 <td> 211 <input type="radio" name="parkedcallreparking" id="parkedcallreparking-caller" value="caller" <?php echo $parkedcallreparking == 'caller' ? "checked=\"yes\"" : ""?>/><label for="parkedcallreparking-caller"><?php echo _("Caller") ?></label> 212 <input type="radio" name="parkedcallreparking" id="parkedcallreparking-parked" value="parked" <?php echo $parkedcallreparking == 'parked' ? "checked=\"yes\"" : ""?>/><label for="parkedcallreparking-parked"><?php echo _("Parked") ?></label> 213 <input type="radio" name="parkedcallreparking" id="parkedcallreparking-both" value="both" <?php echo $parkedcallreparking == 'both' ? "checked=\"yes\"" : ""?>/><label for="parkedcallreparking-both"><?php echo _("Both") ?></label> 214 <input type="radio" name="parkedcallreparking" id="parkedcallreparking-no" value="no" <?php echo $parkedcallreparking == 'no' ? "checked=\"yes\"" : ""?>/><label for="parkedcallreparking-no"><?php echo _("Neither") ?></label> 215 </td> 216 </tr> 217 218 <tr> 219 <td><a href="#" class="info"><?php echo _("One Touch Recording Capability:")?><span><?php echo _("Asterisk: parkedcallrecording. Enables or disables DTMF based one-touch recording when picking up a parked call.")?></span></a></td> 220 <td> 221 <input type="radio" name="parkedcallrecording" id="parkedcallrecording-caller" value="caller" <?php echo $parkedcallrecording == 'caller' ? "checked=\"yes\"" : ""?>/><label for="parkedcallrecording-caller"><?php echo _("Caller") ?></label> 222 <input type="radio" name="parkedcallrecording" id="parkedcallrecording-parked" value="parked" <?php echo $parkedcallrecording == 'parked' ? "checked=\"yes\"" : ""?>/><label for="parkedcallrecording-parked"><?php echo _("Parked") ?></label> 223 <input type="radio" name="parkedcallrecording" id="parkedcallrecording-both" value="both" <?php echo $parkedcallrecording == 'both' ? "checked=\"yes\"" : ""?>/><label for="parkedcallrecording-both"><?php echo _("Both") ?></label> 224 <input type="radio" name="parkedcallrecording" id="parkedcallrecording-no" value="no" <?php echo $parkedcallrecording == 'no' ? "checked=\"yes\"" : ""?>/><label for="parkedcallrecording-no"><?php echo _("Neither") ?></label> 225 </td> 226 </tr> 227 228 <tr> 229 <td><a href="#" class="info"><?php echo _("DTMF Based Hangup Capability:")?><span><?php echo _("Asterisk: parkedcallhangup. Enables or disables DTMF based hangups when picking up a parked call.")?></span></a></td> 230 <td> 231 <input type="radio" name="parkedcallhangup" id="parkedcallhangup-caller" value="caller" <?php echo $parkedcallhangup == 'caller' ? "checked=\"yes\"" : ""?>/><label for="parkedcallhangup-caller"><?php echo _("Caller") ?></label> 232 <input type="radio" name="parkedcallhangup" id="parkedcallhangup-parked" value="parked" <?php echo $parkedcallhangup == 'parked' ? "checked=\"yes\"" : ""?>/><label for="parkedcallhangup-parked"><?php echo _("Parked") ?></label> 233 <input type="radio" name="parkedcallhangup" id="parkedcallhangup-both" value="both" <?php echo $parkedcallhangup == 'both' ? "checked=\"yes\"" : ""?>/><label for="parkedcallhangup-both"><?php echo _("Both") ?></label> 234 <input type="radio" name="parkedcallhangup" id="parkedcallhangup-no" value="no" <?php echo $parkedcallhangup == 'no' ? "checked=\"yes\"" : ""?>/><label for="parkedcallhangup-no"><?php echo _("Neither") ?></label> 235 </td> 236 </tr> 237 238 <tr> 239 <td><a href="#" class="info"><?php echo _("Return Destination Behavior:")?><span><?php echo _("Where to send a parked call that has timed out. The call can be sent back to the original device that parked the call, or it can be sent back to the alternate destination. In both cases, any configured Alert-Info, Caller ID prepend, or annoucement will be applied to the call. If configured to send back to the Originator and they are not available (phone is offline), the alternate destination will be used.")?></span></a></td> 240 <td> 241 <input type="radio" name="parking_dest" id="parking_dest-device" value="device" <?php echo $parking_dest == 'device' ? "checked=\"yes\"" : ""?>/><label for="parking_dest-device"><?php echo _("Originator") ?></label> 242 <input type="radio" name="parking_dest" id="parking_dest-dest" value="dest" <?php echo $parking_dest == 'dest' ? "checked=\"yes\"" : ""?>/><label for="parking_dest-dest"><?php echo _("Alternate Destination") ?></label> 243 </td> 244 </tr> 245 <?php 246 $alert_info_tt = _("Alert-Info to add to the call prior to sending back to the Originator or to the Alternate Destination."); 247 $caller_id_tt = _("String to prepend to the current Caller ID assoicated with the parked call prior to sending back to the Originator or the Alternate Destination."); 248 $announcement_tt = _("Optional message to be played to the call prior to sending back to the Originator or the Alternate Destination."); 249 $dest_label = _("Alternate Destination"); 250 } else { 251 $alert_info_tt = _("Alert-Info to put in channel before going to defined destination below. This can create distinct rings on some SIP phones and can serve to alert the recipients that the call is from an Orphaned parked call"); 252 $caller_id_tt = _("String to pre-pend to the current Caller-ID associated with this call (if any), before going to defined destination below. This can serve to alert the recipients that the call is from an Orphaned parked call"); 253 $announcement_tt = _("Announcement:")?><span><?php echo _("Optional message to be played to the orphaned caller prior to going on the to supplied destination below.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left"); 254 $dest_label = _("Destination for Orphaned Parked Calls"); 255 ?> 105 256 <tr><td colspan="2"><br><h5><?php echo _("Actions for Timed-Out Orphans")?><hr></h5></td></tr> 106 <tr> 107 <td><a href=# class="info"><?php echo _("Parking Alert-Info:")?><span> 108 <?php echo _("Alert-Info to put in channel before going to defined destination below. This can create distinct rings on some SIP phones and can serve to alert the recipients that the call is from an Orphaned parked call")?><br> 257 <?php 258 } 259 ?> 260 <tr> 261 <td><a href=# class="info"><?php echo _("Parking Alert-Info:")?><span><?php echo $alert_info_tt ?><br></span></a></td> 262 <td align=right><input type="text" size="40" name="parkalertinfo" value="<?php echo htmlspecialchars($parkalertinfo)?>" tabindex="<?php echo ++$tabindex;?>"/></td> 263 </tr> 264 <tr> 265 <td><a href=# class="info"><?php echo _("CallerID Prepend:")?><span> 266 <?php echo $caller_id_tt ?><br> 109 267 </span></a></td> 110 <td align=right><input type="text" size="19" name="parkalertinfo" value="<?php echo htmlspecialchars($parkalertinfo)?>" tabindex="<?php echo ++$tabindex;?>"/></td> 111 </tr> 112 <tr> 113 <td><a href=# class="info"><?php echo _("CallerID Prepend:")?><span> 114 <?php echo _("String to pre-pend to the current Caller-ID associated with this call (if any), before going to defined destination below. This can serve to alert the recipients that the call is from an Orphaned parked call")?><br> 115 </span></a></td> 116 <td align=right><input type="text" size="19" name="parkcid" value="<?php echo htmlspecialchars($parkcid)?>" tabindex="<?php echo ++$tabindex;?>"/></td> 268 <td align=right><input type="text" size="20" name="parkcid" value="<?php echo htmlspecialchars($parkcid)?>" tabindex="<?php echo ++$tabindex;?>"/></td> 117 269 </tr> 118 270 <?php if(function_exists('recordings_list')) { //only include if recordings is enabled?> 119 271 <tr> 120 <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo _("Optional message to be played to the orphaned caller prior to going on the to supplied destination below.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>272 <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo $announcement_tt ?></span></a></td> 121 273 <td align=right> 122 274 <select name="parkingannmsg_id" tabindex="<?php echo ++$tabindex;?>"> … … 130 282 } 131 283 } 132 133 284 ?> 134 285 </select> … … 137 288 <?php } else { ?> 138 289 <tr> 139 <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo _("Optional message to be played to the orphaned caller prior to going on to the supplied destination below.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>290 <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo $announcement_tt . '<br /><br />' . _("You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td> 140 291 <td align=right> 141 292 <?php … … 147 298 <?php } ?> 148 299 149 <tr><td colspan="2"><br><h5><?php echo _("Destination for Orphaned Parked Calls")?>:<hr></h5></td></tr>300 <tr><td colspan="2"><br><h5><?php echo $dest_label?>:<hr></h5></td></tr> 150 301 <?php 151 302 //draw goto selects
