--- chan_dahdi.c 2010-06-02 16:54:31.000000000 -0300 +++ chan_dahdi.c 2010-06-02 19:22:32.000000000 -0300 @@ -12030,6 +12030,16 @@ if (conf->chan.vars) { struct ast_variable *v, *tmpvar; for (v = conf->chan.vars ; v ; v = v->next) { + int skip = 0; + for (tmpvar = tmp->vars ; tmpvar; tmpvar = tmpvar->next) + if(!strcasecmp(v->name, tmpvar->name)) { + /* for duplicate entries only take the first in the list */ + skip = 1; + break; + } + if(skip) + continue; + if ((tmpvar = ast_variable_new(v->name, v->value, v->file))) { tmpvar->next = tmp->vars; tmp->vars = tmpvar;