Update of /usr/cvsroot/asterisk In directory mongoose.digium.com:/tmp/cvs-serv21782 Modified Files: pbx.c Log Message: Add execiftime, remove duplicate agent logoff CLI Index: pbx.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx.c,v retrieving revision 1.206 retrieving revision 1.207 diff -u -d -r1.206 -r1.207 --- pbx.c 23 Feb 2005 22:48:47 -0000 1.206 +++ pbx.c 25 Feb 2005 00:25:27 -0000 1.207 @@ -182,6 +182,7 @@ static int pbx_builtin_noop(struct ast_channel *, void *); static int pbx_builtin_gotoif(struct ast_channel *, void *); static int pbx_builtin_gotoiftime(struct ast_channel *, void *); +static int pbx_builtin_execiftime(struct ast_channel *, void *); static int pbx_builtin_saynumber(struct ast_channel *, void *); static int pbx_builtin_saydigits(struct ast_channel *, void *); static int pbx_builtin_saycharacters(struct ast_channel *, void *); @@ -289,6 +290,14 @@ "extension. Each of the elements may be specified either as '*' (for always)\n" "or as a range. See the 'include' syntax for details." }, + + { "ExecIfTime", pbx_builtin_execiftime, + "Conditional application execution on current time", + " ExecIfTime(|||?[|]):\n" + "If the current time matches the specified time, then execute the specified\n" + "application. Each of the elements may be specified either as '*' (for always)\n" + "or as a range. See the 'include' syntax for details." + }, { "Hangup", pbx_builtin_hangup, "Unconditional hangup", @@ -5004,21 +5013,65 @@ char *s, *ts; struct ast_timing timing; - if (!data) { + if (!data || ast_strlen_zero(data)) { ast_log(LOG_WARNING, "GotoIfTime requires an argument:\n