mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
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:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user