If a Q.931 call record related timer is started on one NFAS D channel
expires after NFAS swaps to another D channel, then libpri could crash.
For example:
1) Hangup a call.
1a) Send a DISCONNECT.
1b) Start the T305 retransmit timer on the current D channel.
2) The RELEASE comes in on another D channel.
2a) The found call record switches its assignment to the new D channel.
2b) Attempt to stop T305. Unfortunately, the timer was started on another
D channel so the attempt does not find the timer to stop.
3) The hangup sequence continues normally and the call record is freed
since there is only one call record pool.
4) T305 expires on the original D channel and crashes the system when it
uses the stale call record pointer it has saved.
Made each D channel timer pool have a unique range of valid timer
identifiers. If a given timer identifier is not in the range for the
current NFAS D channel, then search the D channel group for the original D
channel.
JIRA LIBPRI-58
JIRA SWP-2721
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2202 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This completes the layer 2 link and Q.931 call control restructuring.
Some code is now simplified since there is only one D channel control
structure and the amount of allocated memory is reduced.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2077 2fbb986a-6c06-0410-b554-c9c1f0a7f128
If the connection to the terminal is lost while there are open channels
on the interface, red alarm is reported, but the open channels are never
cleared. Additionally, if you manually try to channel request hangup,
Asterisk crashes.
For PTMP, the T309 processing was not searching the call pool on the
master control record. Additionally, for NT PTMP, the timeout events were
not passed to the upper layer because the events were not put on the
master control record where timer processing expects them.
(closes issue #17865)
Reported by: wimpy
Patches:
issue17865_v1.4.patch uploaded by rmudgett (license 664)
Tested by: rmudgett, wimpy
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1982 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Call Completion Supplementary Service (CCSS) added for the following
switch types: ETSI PTMP, ETSI PTP, Q.SIG.
Specifications:
ETS 300 359 CCBS for PTMP and PTP
ETS 301 065 CCNR for PTMP and PTP
ECMA-186 Call Completion for Q.SIG
Several support services were added to support CC:
Dummy Call Reference.
Q.931 REGISTER message.
Dynamic expansion of the number of available timers (up to 8192).
Enhanced facility message handling.
Current implementation limitations preclude the following:
CC service retention is not supported.
Q.SIG path reservation is not supported.
(closes issue #14292)
Reported by: tomaso
Tested by: rmudgett
JIRA SWP-1493
Review: https://reviewboard.asterisk.org/r/522/
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1714 2fbb986a-6c06-0410-b554-c9c1f0a7f128
* Fixed pri_schedule_event() to return 0 on error instead of -1. Zero is
a safer value to return. Users would not think that a timer was
scheduled.
* Fixed potential for pri_schedule_del() to write out of bounds of
pri_sched[]. The out of bounds access could occur when
pri_schedule_event() returned -1.
* Made use all pri_sched[] entries. pri_sched[0] was previously unused.
* Removed some unneeded code and recursion since scheduling only runs on
master D channel structures.
* Added doxygen comments.
* Renamed struct pri *pri variables to struct pri *ctrl in this file.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1059 2fbb986a-6c06-0410-b554-c9c1f0a7f128