chan_dahdi: Configurable dialed digit timeouts

Analog phones dial overlap dialing and it is chan_dahdi's job to read the
numbers.  It has three timeout constants that this commit converts to
channel-level configuration options:

* firstdigit_timeout: Default time (ms) to detect first digit

* interdigit_timeout: Default time (ms) to detect following digits

* matchdigit_timeout: Default time (ms) to wait in case of ambiguous
match.  This happens when the dialed digits match a number in the current
context but are also the prefix of another number.

Change-Id: Ib728fa900a4f6ae56d1ed810aba61b6593fb7213
This commit is contained in:
Tzafrir Cohen
2018-03-21 14:30:18 +02:00
committed by Richard Mudgett
parent e538fc8e86
commit 6301531416
7 changed files with 118 additions and 29 deletions

View File

@@ -617,6 +617,21 @@ struct dahdi_pvt {
* \note Set from the "faxdetect_timeout" value read in from chan_dahdi.conf
*/
unsigned int faxdetect_timeout;
/*!
* \brief Time (ms) to detect first digit (in an analog phone)
* \note Set from the "firstdigit_timeout" value read in from chan_dahdi.conf
*/
int firstdigit_timeout;
/*!
* \brief Time (ms) to detect following digits (in an analog phone)
* \note Set from the "interdigit_timeout" value read in from chan_dahdi.conf
*/
int interdigit_timeout;
/*!
* \brief Time (ms) to wait, in case of ambiguous match (in an analog phone)
* \note Set from the "matchdigit_timeout" value read in from chan_dahdi.conf
*/
int matchdigit_timeout;
struct timeval waitingfordt; /*!< Time we started waiting for dialtone */
struct timeval flashtime; /*!< Last flash-hook time */
/*! \brief Opaque DSP configuration structure. */