aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--funcs/func_dialgroup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/funcs/func_dialgroup.c b/funcs/func_dialgroup.c
index 467bc87fa..b1fa78017 100644
--- a/funcs/func_dialgroup.c
+++ b/funcs/func_dialgroup.c
@@ -236,6 +236,11 @@ static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data
if (strcasecmp(args.op, "add") == 0) {
for (j = 0; j < inter.argc; j++) {
+ /* Eliminate duplicates */
+ if ((entry = ao2_find(grhead->entries, inter.faces[j], 0))) {
+ ao2_ref(entry, -1);
+ continue;
+ }
if ((entry = ao2_alloc(sizeof(*entry), NULL))) {
ast_copy_string(entry->name, inter.faces[j], sizeof(entry->name));
ao2_link(grhead->entries, entry);