Issue #8089 - Fix the ENUM support (picking one record by number). Thanks otmar!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Olle Johansson
2006-10-31 10:56:20 +00:00
parent 9ab1cc22a4
commit d318976f4d
3 changed files with 41 additions and 27 deletions

View File

@@ -65,6 +65,7 @@ static int function_enum(struct ast_channel *chan, char *cmd, char *data,
char dest[256] = "", tmp[2] = "", num[AST_MAX_EXTENSION] = "";
struct ast_module_user *u;
char *s, *p;
unsigned int record = 1;
buf[0] = '\0';
@@ -88,7 +89,10 @@ static int function_enum(struct ast_channel *chan, char *cmd, char *data,
args.zone = "e164.arpa";
if (!args.options)
args.options = "1";
args.options = "";
if (args.record)
record = atoi(args.record);
/* strip any '-' signs from number */
for (s = p = args.number; *s; s++) {
@@ -100,7 +104,7 @@ static int function_enum(struct ast_channel *chan, char *cmd, char *data,
}
res = ast_get_enum(chan, num, dest, sizeof(dest), tech, sizeof(tech), args.zone,
args.options);
args.options, record);
p = strchr(dest, ':');
if (p && strcasecmp(tech, "ALL"))