case '1':
/* user pressed '1' and extensions exists */
lastuserchoice = res;
+ strncpy(chan->context, dialcontext, sizeof(chan->context) - 1);
+ strncpy(chan->exten, v->name, sizeof(chan->exten) - 1);
+ chan->priority = 0;
break;
case '*':
/* user pressed '*' to skip something found */
res = 1;
return res;
}
-
+ return 0;
}
return res;
}
struct ast_config *cfg;
char *context, *dialcontext, *dirintro;
if (!data) {
- ast_log(LOG_WARNING, "directory requires an argument (context)\n");
+ ast_log(LOG_WARNING, "directory requires an argument (context[,dialcontext])\n");
return -1;
}
cfg = ast_load(DIRECTORY_CONFIG);