Commit 1013e762 authored by Richard Mudgett's avatar Richard Mudgett

Implement the mandatory T312 timer for NT PTMP broadcast SETUP calls.

* Fixed stopping T303 too early on a NT PTMP broadcast SETUP call if a
subcall just receives a RELEASE_COMPLETE(busy).

* Fixed a valgrind reported invalid read/write when hanging up a NT PTMP
broadcast SETUP call.

JIRA LIBPRI-32
JIRA SWP-2548


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2238 2fbb986a-6c06-0410-b554-c9c1f0a7f128
parent afd91f7f
......@@ -2153,6 +2153,8 @@ enum PRI_TIMERS_AND_COUNTERS {
PRI_TIMER_QSIG_CC_T3, /*!< Max time to wait for user A to respond to user B availability. */
PRI_TIMER_QSIG_CC_T4, /*!< Path reservation supervision timeout. */
PRI_TIMER_T312, /*!< Supervise broadcast SETUP message call reference retention. */
/* Must be last in the enum list */
PRI_MAX_TIMERS
};
......
......@@ -77,6 +77,7 @@ static const struct pri_timer_table pri_timer[] = {
{ "T308", PRI_TIMER_T308, PRI_ALL_SWITCHES },
{ "T309", PRI_TIMER_T309, PRI_ALL_SWITCHES },
{ "T310", PRI_TIMER_T310, PRI_ALL_SWITCHES },
{ "T312", PRI_TIMER_T312, PRI_ALL_SWITCHES },
{ "T313", PRI_TIMER_T313, PRI_ALL_SWITCHES },
{ "T314", PRI_TIMER_T314, PRI_ALL_SWITCHES },
{ "T316", PRI_TIMER_T316, PRI_ALL_SWITCHES },
......@@ -181,6 +182,7 @@ static void pri_default_timers(struct pri *ctrl, int switchtype)
ctrl->timers[PRI_TIMER_T305] = 30 * 1000; /* Wait for DISCONNECT acknowledge */
ctrl->timers[PRI_TIMER_T308] = 4 * 1000; /* Wait for RELEASE acknowledge */
ctrl->timers[PRI_TIMER_T309] = 6 * 1000; /* Time to wait before clearing calls in case of D-channel transient event. Q.931 specifies 6-90 seconds */
ctrl->timers[PRI_TIMER_T312] = (4 + 2) * 1000;/* Supervise broadcast SETUP message call reference retention. T303 + 2 seconds */
ctrl->timers[PRI_TIMER_T313] = 4 * 1000; /* Wait for CONNECT acknowledge, CPE side only */
ctrl->timers[PRI_TIMER_TM20] = 2500; /* Max time awaiting XID response - Q.921 Appendix IV */
......
......@@ -578,11 +578,14 @@ struct q931_call {
0,2-7 - Reserved for future use */
int t303_timer;
int t303_expirycnt;
int t312_timer;
int fake_clearing_timer;
int hangupinitiated;
/*! \brief TRUE if we broadcast this call's SETUP message. */
int outboundbroadcast;
int performing_fake_clearing;
/*! TRUE if the master call is processing a hangup. Don't destroy it now. */
int master_hanging_up;
/*!
* \brief Master call controlling this call.
* \note Always valid. Master and normal calls point to self.
......
......@@ -443,6 +443,8 @@ enum Q931_RANKED_CALL_STATE {
Q931_RANKED_CALL_STATE_CONNECT,
/*! Call is in some non-call establishment state (likely disconnecting). */
Q931_RANKED_CALL_STATE_OTHER,
/*! Master call is aborting. */
Q931_RANKED_CALL_STATE_ABORT,
};
/* EuroISDN */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment