/* * Asterisk -- An open source telephony toolkit. * * Copyright (c) 2003 - 2005 Tilghman Lesher. All rights reserved. * * Tilghman Lesher * * This code is released by the author with no restrictions on usage or distribution. * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact * any of the maintainers of this project for assistance; * the project provides a web site, mailing lists and IRC * channels for your use. * */ /*! \file * * \brief Random application * * \author Tilghman Lesher * \ingroup applications */ #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include #include #include "asterisk/file.h" #include "asterisk/logger.h" #include "asterisk/options.h" #include "asterisk/channel.h" #include "asterisk/pbx.h" #include "asterisk/module.h" /*! \todo The Random() app should be removed from trunk following the release of 1.4 */ static char *app_random = "Random"; static char *random_synopsis = "Conditionally branches, based upon a probability"; static char *random_descrip = "Random([probability]:[[context|]extension|]priority)\n" " probability := INTEGER in the range 1 to 100\n" "DEPRECATED: Use GotoIf($[${RAND(1,100)} > ]?