diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-01-13 21:27:34 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-01-13 21:27:34 +0000 |
commit | ecbe7eff7a557a4aa55fb43e60299cf4f36165d9 (patch) | |
tree | bd84872c5ca0ec098e3ded6ff22ec2e680cee56f /include/asterisk | |
parent | 919437428ea4856e5305e2a8f987e8290b38d20a (diff) |
Add the TESTTIME() dialplan function, which permits testing GotoIfTime.
Specifically, by setting TESTTIME() to a particular date and time, you
can test whether a dialplan correctly branches as was intended. This was
developed after recent questions on the -users list on how to test their
holiday dialplan logic.
(closes issue #16464)
Reported by: tilghman
Patches:
20100112__issue16464.diff.txt uploaded by tilghman (license 14)
Review: https://reviewboard.asterisk.org/r/458/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@239957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/pbx.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index a5c3b2248..50a18a624 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -147,6 +147,14 @@ int ast_build_timing(struct ast_timing *i, const char *info); int ast_check_timing(const struct ast_timing *i); /*! + * \brief Evaluate a pre-constructed bitmap as to whether a particular time falls within the range specified. + * \param i Pointer to an ast_timing structure. + * \param tv Specified time + * \retval Returns 1, if the time matches or 0, if the time falls outside of the specified range. + */ +int ast_check_timing2(const struct ast_timing *i, const struct timeval tv); + +/*! * \brief Deallocates memory structures associated with a timing bitmap. * \param i Pointer to an ast_timing structure. * \retval 0 success |