code: protected ConfigExtension parseExtension(String configfile, int lineno, String line) throws ConfigParseException
      {
          ConfigVariable initialVariable = parseVariable(configfile, lineno, line);
  
          if (!initialVariable.getName().equals("exten"))
              throw new ConfigParseException(configfile, lineno, "missing 'exten' near " + line);
          line = initialVariable.getValue().trim();
  
          int nameIndex = line.indexOf(",", 0);
          if (nameIndex == -1)
              throw new ConfigParseException(configfile, lineno, "missing extension name near " + line);
          String name = line.substring(0, nameIndex);
          line = line.substring(name.length() + 1, line.length()).trim();
  
          int priorityDelimiter = line.indexOf(",", 0);
          if (priorityDelimiter == -1)
              throw new ConfigParseException(configfile, lineno, "missing extension priority near " + line);
          String priority = line.substring(0, priorityDelimiter);
          line = line.substring(priority.length() + 1, line.length()).trim();
  
          String[] application = harvestApplicationWithArguments(line);
  
          return new ConfigExtension(configfile, lineno, name, priority, application);
      }
docs: /* Roughly corresponds to pbx_config.c:2222