app_dial.c: RINGTIME, PROGRESSTIME and ms resolution dial timings

Added RINGTIME, RINGTIME_MS, PROGRESSTIME, PROGRESSTIME_MS variables filled
at the earliest received PROGRESS or RINGING.
Added millisecond versions of DIALEDTIME and ANSWEREDTIME.

Added millisecond versions of ast_channel_get_up_time and
ast_channel_get_duration in channel.c.

ASTERISK-28363

Change-Id: If95f1a7d8c4acbac740037de0c6e3109ff6620b1
This commit is contained in:
Antoni Goldstein
2019-03-29 14:04:46 +00:00
committed by Sean Bright
parent 92712891f9
commit d6b37e2926
4 changed files with 129 additions and 12 deletions

View File

@@ -2405,6 +2405,18 @@ int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen,
/*! Deactivate an active generator */
void ast_deactivate_generator(struct ast_channel *chan);
/*!
* \since 13.27.0
* \since 16.4.0
* \brief Obtain how long it's been, in milliseconds, since the channel was created
*
* \param chan The channel object
*
* \retval 0 if the time value cannot be computed (or you called this really fast)
* \retval The number of milliseconds since channel creation
*/
int64_t ast_channel_get_duration_ms(struct ast_channel *chan);
/*!
* \since 12
* \brief Obtain how long the channel since the channel was created
@@ -2416,6 +2428,18 @@ void ast_deactivate_generator(struct ast_channel *chan);
*/
int ast_channel_get_duration(struct ast_channel *chan);
/*!
* \since 13.27.0
* \since 16.4.0
* \brief Obtain how long it has been since the channel was answered in ms
*
* \param chan The channel object
*
* \retval 0 if the channel isn't answered (or you called this really fast)
* \retval The number of milliseconds the channel has been up
*/
int64_t ast_channel_get_up_time_ms(struct ast_channel *chan);
/*!
* \since 12
* \brief Obtain how long it has been since the channel was answered