Index: apps/app_random.c =================================================================== --- apps/app_random.c (revision 7688) +++ apps/app_random.c (working copy) @@ -47,7 +47,8 @@ static char *random_descrip = "Random([probability]:[[context|]extension|]priority)\n" -" probability := INTEGER in the range 1 to 100\n"; +" probability := INTEGER in the range 1 to 100\n" +" Random has been deprecated in favor of Set(value=${RAND([min][,max])})\n"; STANDARD_LOCAL_USER; @@ -63,14 +64,20 @@ char *s; char *prob; int probint; + static int dep_warning = 0; if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Random requires an argument ([probability]:[[context|]extension|]priority)\n"); return -1; } - - LOCAL_USER_ADD(u); + if (!dep_warning) { + ast_log(LOG_WARNING, "This application has been deprecated in favor of the RAND dialplan function.\n"); + dep_warning = 1; + } + + LOCAL_USER_ADD(u); + s = ast_strdupa(data); if (!s) { ast_log(LOG_ERROR, "Out of memory!\n");