Changeset 5904
- Timestamp:
- 07/04/08 14:30:53 (5 months ago)
- Files:
-
- modules/branches/2.5/core/functions.inc.php (modified) (8 diffs)
- modules/branches/2.5/core/page.did.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/core/functions.inc.php
r5902 r5904 757 757 $exten = $item['extension']; 758 758 $cidnum = $item['cidnum']; 759 760 // If the user put in just a cid number for routing, we add _. pattern to catch 761 // all DIDs with that CID number. Asterisk will complain about _. being dangerous 762 // but we don't want to limit this to just numberic as someone may be trying to 763 // route a non-numeric did 764 // 765 if (trim($cidnum) != '' && trim($exten) == '') { 766 $exten = '_.'; 767 } 759 768 760 769 $exten = (empty($exten)?"s":$exten); … … 2361 2370 $newdidcid = preg_replace("/[^0-9._XxNnZz\[\]\-\+]/" ,"", trim($newdidcid)); 2362 2371 2363 // Asterisk does not want just CID set so if it is add _X. to the DID2364 //2365 if ($newdid == '' && $newdidcid != '') {2366 $newdid = '_X.';2367 }2368 2372 // Well more ugliness since the javascripts are already in here 2369 if ($newdid != '' ) {2373 if ($newdid != '' || $newdidcid != '') { 2370 2374 $existing = core_did_get($newdid, $newdidcid); 2371 2375 if (! empty($existing)) { … … 2501 2505 // Now if $newdid is set we need to add the DID to the routes 2502 2506 // 2503 if ($newdid != '' ) {2507 if ($newdid != '' || $newdidcid != '') { 2504 2508 $did_dest = 'from-did-direct,'.$extension.',1'; 2505 2509 $did_vars['extension'] = $newdid; … … 2631 2635 $newdidcid = preg_replace("/[^0-9._XxNnZz\[\]\-\+]/" ,"", trim($newdidcid)); 2632 2636 2633 // Asterisk does not want just CID set so if it is add _X. to the DID2634 //2635 if ($newdid == '' && $newdidcid != '') {2636 $newdid = '_X.';2637 }2638 2637 // Well more ugliness since the javascripts are already in here 2639 if ($newdid != '' ) {2638 if ($newdid != '' || $newdidcid != '') { 2640 2639 $existing = core_did_get($newdid, $newdidcid); 2641 2640 if (! empty($existing)) { … … 3783 3782 array ( "name" => "South Africa", "iso" => "za", "conf" => "ringcadence = 400,200,400,2000\ndial = 400*33\nbusy = 400/500,0/500\nring = 400*33/400,0/200,400*33/400,0/2000\ncongestion = 400/250,0/250\ncallwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250\ndialrecall = 350+440\nrecord = 1400/500,0/10000\ninfo = 950/330,1400/330,1800/330,0/330\nstutter =!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33 \n"), 3784 3783 array ( "name" => "Sweden", "iso" => "se", "conf" => "ringcadence = 1000,5000\ndial = 425\nbusy = 425/250,0/250\nring = 425/1000,0/5000\ncongestion = 425/250,0/750\ncallwaiting = 425/200,0/500,425/200,0/9100\ndialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425\nrecord = 1400/500,0/15000\ninfo = !950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,0\nstutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425\n"), 3784 array ("name" => "Turkey", "iso" => "tr", "conf" => "ringcadance = 2000,4000\ndial = 450\nbusy = 450/500,0/500\nring = 450/2000,450/4000\ncongestion = 450/200,0/200,450/200,0/200,450/200,0/200,450/600,0/200\ncallwaiting = 450/200,0/600,450/200,0/8000\ndialrecall = 450/1000,0/250\nrecord = 1400/500,0/15000\ninfo = !950/300,!1400/300,!1800/300,!0/1000,!950/300,!1400/300,!1800/300,!0/1000,!950/300,!1400/300,!1800/300,!0/1000,0\n"), 3785 3785 array ( "name" => "United Kingdom", "iso" => "uk", "conf" => "ringcadence = 400,200,400,2000\ndial = 350+440\nspecialdial = 350+440/750,440/750\nbusy = 400/375,0/375\ncongestion = 400/400,0/350,400/225,0/525\nspecialcongestion = 400/200,1004/300\nunobtainable = 400\nring = 400+450/400,0/200,400+450/400,0/2000\ncallwaiting = 400/100,0/4000\nspecialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000\ncreditexpired = 400/125,0/125\nconfirm = 1400\nswitching = 400/200,0/400,400/2000,0/400\ninfo = 950/330,0/15,1400/330,0/15,1800/330,0/1000\nrecord = 1400/500,0/60000\nstutter = 350+440/750,440/750\n"), 3786 3786 array ( "name" => "United States / North America", "iso" => "us", "conf" => "ringcadence = 2000,4000\ndial = 350+440\nbusy = 480+620/500,0/500\nring = 440+480/2000,0/4000\ncongestion = 480+620/250,0/250\ncallwaiting = 440/300,0/10000\ndialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440\nrecord = 1400/500,0/15000\ninfo = !950/330,!1400/330,!1800/330,0\nstutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440\n"), … … 4002 4002 4003 4003 $section = _("Assigned DID/CID"); 4004 $currentcomponent->addguielem($section, new gui_textbox('newdid', $newdid, 'Add Inbound DID', _("A direct DID that is associated with this extension. The DID should be in the same format as provided by the provider (e.g. full number, 4 digits for 10x4, etc).<br><br>Format should be: <b>XXXXXXXXXX</b><br><br>.An optional CID can also be associated with this DID by setting the next box")), 4); 4005 $currentcomponent->addguielem($section, new gui_textbox('newdidcid', $newdidcid, 'Add Inbound CID', _("Add a CID for more specific DID + CID routing. A CID must be specified in the above Add DID box")), 4); 4006 4004 4007 $dids = core_did_list('extension'); 4005 4008 $did_count = 0; … … 4012 4015 $addURL = $_SERVER['PHP_SELF'].'?type=setup&display=did&&extdisplay='.$did['extension'].'/'.$did['cidnum']; 4013 4016 $did_icon = 'images/email_edit.png'; 4014 $did_label = ' '.$did['extension'];4017 $did_label = trim($did['extension']) == '' ? ' Any DID' : ' '.$did['extension']; 4015 4018 if (trim($did['cidnum']) != '') { 4016 4019 $did_label .= ' / '.$did['cidnum']; … … 4027 4030 } 4028 4031 } 4029 $currentcomponent->addguielem($section, new gui_textbox('newdid', $newdid, 'Add Inbound DID', _("A direct DID that is associated with this extension. The DID should be in the same format as provided by the provider (e.g. full number, 4 digits for 10x4, etc).<br><br>Format should be: <b>XXXXXXXXXX</b><br><br>.An optional CID can also be associated with this DID by setting the next box")), 4);4030 $currentcomponent->addguielem($section, new gui_textbox('newdidcid', $newdidcid, 'Add Inbound CID', _("Add a CID for more specific DID + CID routing. A CID must be specified in the above Add DID box")), 4);4031 4032 4032 4033 4033 $section = 'Recording Options'; modules/branches/2.5/core/page.did.php
r5898 r5904 60 60 61 61 <?php 62 $display_link = isset($extdisplay) && $extdisp aly != '' ? "&extdisplay=".$extdisplay : '';62 $display_link = isset($extdisplay) && $extdisplay != '' ? "&extdisplay=".$extdisplay : ''; 63 63 ?> 64 64 <div class="rnav"> 65 65 <ul> 66 66 <li><a <?php echo ($extdisplay=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Incoming Route")?></a></li> 67 <li><a <?php echo ($didfilter=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).$display_link?>"><?php echo _("View All ")?></a></li>68 <li><a <?php echo ($didfilter=='directdid' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).'&didfilter=directdid'.$display_link?>"><?php echo _("View Extensions")?></a></li>69 <li><a <?php echo ($didfilter=='incoming' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).'&didfilter=incoming'.$display_link?>"><?php echo _("View General ")?></a></li>70 <li><a <?php echo ($didfilter=='unassigned' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).'&didfilter=unassigned'.$display_link?>"><?php echo _("View Un -Assigned")?></a></li>67 <li><a <?php echo ($didfilter=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).$display_link?>"><?php echo _("View All DIDs")?></a></li> 68 <li><a <?php echo ($didfilter=='directdid' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).'&didfilter=directdid'.$display_link?>"><?php echo _("View User DIDs")?></a></li> 69 <li><a <?php echo ($didfilter=='incoming' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).'&didfilter=incoming'.$display_link?>"><?php echo _("View General DIDs")?></a></li> 70 <li><a <?php echo ($didfilter=='unassigned' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum).'&didfilter=unassigned'.$display_link?>"><?php echo _("View Unused DIDs")?></a></li><hr> 71 71 <?php 72 72 //get unique incoming routes … … 125 125 <h2><?php echo _("Route")?>: <?php echo !empty($description)?$description:$extdisplay; ?></h2> 126 126 <a href="<?php echo $delURL ?>"><?php echo _("Delete Route")?> <?php echo !empty($description)?$description:$extdisplay ?></a> 127 <?php 128 // If this is a direct did, e.g. from-did-direct,nnn,1 then make a link to the extension 129 // 130 $did_dest = split(',',$destination); 131 if (isset($did_dest[0]) && $did_dest[0] == 'from-did-direct') { 132 133 if (isset($amp_conf["AMPEXTENSIONS"]) && ($amp_conf["AMPEXTENSIONS"] == "deviceanduser")) { 134 $editURL = $_SERVER['PHP_SELF'].'?display=users&extdisplay='.$did_dest[1]; 135 $EXTorUSER = "User"; 136 } 137 else { 138 $editURL = $_SERVER['PHP_SELF'].'?display=extensions&extdisplay='.$did_dest[1]; 139 $EXTorUSER = "Extension"; 140 } 141 echo "<p><a href=".$editURL."> Edit ".$EXTorUSER." ".$did_dest[1]."</a></p>"; 142 } 143 ?> 127 144 <?php } else { ?> 128 145 <h2><?php echo _("Add Incoming Route")?></h2>
