diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-31 10:56:20 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-31 10:56:20 +0000 |
commit | 9d10da3a963359c7e34c565ed0d9901ef619fb3e (patch) | |
tree | 02a3efdbb322db18e9fe090b7b3c52c8c95d054e /funcs | |
parent | 972f6f432d58ccc2b01686c53f807cd156254a3f (diff) |
Issue #8089 - Fix the ENUM support (picking one record by number). Thanks otmar!
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46631 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_enum.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/funcs/func_enum.c b/funcs/func_enum.c index f37a15fd1..43e953c3b 100644 --- a/funcs/func_enum.c +++ b/funcs/func_enum.c @@ -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")) |