Changeset 7567 for contributed_modules/modules/routepermissions
- Timestamp:
- 03/31/09 10:45:50 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
contributed_modules/modules/routepermissions/agi-bin/checkperms.agi
r7566 r7567 28 28 if (!isset($cidnum) || !is_numeric($cidnum)) { 29 29 debug("CallerID not Parseable - received $cidnum - exiting with DENY",1); 30 $AGI-> goto('barred');30 $AGI->exec_goto("macro-trunk-dial", "barred", "1"); 31 31 exit; 32 32 } … … 39 39 $res = sql("SELECT allowed FROM routepermissions WHERE exten='$cidnum' and routename='$routename'", "getRow"); 40 40 if ($res[0] === "NO") { 41 $AGI-> goto('barred');41 $AGI->exec_goto("macro-trunk-dial", "barred", "1"); 42 42 exit; 43 43 } contributed_modules/modules/routepermissions/module.xml
r7560 r7567 6 6 <canuninstall>yes</canuninstall> 7 7 <changelog> 8 *0.1.0.0* Start Development8 *0.1.0.0* Original Release 9 9 </changelog> 10 10 <description> contributed_modules/modules/routepermissions/page.routepermissions.php
r7564 r7567 57 57 58 58 <tr><td colspan=2><span id="instructions"> 59 <p><h3>Instructions</h3></p> 60 <p>This module allows you to block access to certain routes from specified extensions. You can do bulk changes on this page, 61 and you can individually change access to routes on the extension's page.</p> 62 <p>Note that Asterisk is incapable of having two identical routes and trying to force calls to use the other route if 63 one of them is banned by this module. <b>It will not work.</b> You must have unique outbound routes for the proper selection 64 to work</p> 59 65 <?php 60 66 echo "<p><h3>"._("Bulk Changes"); echo "</h3></p> "; … … 80 86 81 87 function rp_allow($route, $range) { 82 $rangearray = rp_range($range);83 88 $extens = rp_get_extens(); 84 foreach ($rangearray as $r) {85 if ($extens[$r] == "ok") {89 if ($range == "All") { 90 foreach ($extens as $r=>$foo) { 86 91 rp_do($route, $r, "YES"); 92 } 93 } else { 94 $rangearray = rp_range($range); 95 foreach ($rangearray as $r) { 96 if ($extens[$r] == "ok") { 97 rp_do($route, $r, "YES"); 98 } 87 99 } 88 100 } … … 90 102 91 103 function rp_deny($route, $range) { 92 $rangearray = rp_range($range);93 104 $extens = rp_get_extens(); 94 foreach ($rangearray as $r) {95 if ($extens[$r] === "ok") {105 if ($range == "All") { 106 foreach ($extens as $r=>$foo) { 96 107 rp_do($route, $r, "NO"); 108 } 109 } else { 110 $rangearray = rp_range($range); 111 foreach ($rangearray as $r) { 112 if ($extens[$r] == "ok") { 113 rp_do($route, $r, "NO"); 114 } 97 115 } 98 116 }
