コード例 #1
0
ファイル: DialingRule.java プロジェクト: LordGaav/sipxecs
 @Override
 public CallTag getCallTag() {
   // try to determine the call type based on the rule type
   DialingRuleType type = getType();
   if (type != null) {
     CallTag callTag = type.getCallTag();
     if (callTag != null) {
       return callTag;
     }
   }
   // try to check for permissions
   List<Permission> permissions = getPermissions();
   if (permissions == null) {
     return null;
   }
   for (Permission p : permissions) {
     if (!p.isBuiltIn()) {
       continue;
     }
     PermissionName permissionName = PermissionName.findByName(p.getName());
     if (permissionName == null) {
       continue;
     }
     CallTag callTag = permissionName.getCalltag();
     if (callTag != null) {
       return callTag;
     }
   }
   return null;
 }
コード例 #2
0
  private void initAvailableTabs() {
    List<String> tabNames = new ArrayList<String>();
    tabNames.add("extendedInfo");
    tabNames.add("info");
    tabNames.add("distributionLists");
    tabNames.add(TAB_CONFERENCES);
    tabNames.add("openfire");

    String mohPermissionValue = getUser().getSettingValue("permission/application/music-on-hold");
    if (Permission.isEnabled(mohPermissionValue)) {
      tabNames.add("moh");
    }

    String paPermissionValue =
        getUser().getSettingValue("permission/application/personal-auto-attendant");
    if (Permission.isEnabled(paPermissionValue)) {
      tabNames.add("menu");
    }

    tabNames.add("myAssistant");

    setAvailableTabNames(tabNames);
  }