}
/* Roughly corresponds to pbx_config.c:2222 */
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);