Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b82d1deb3e | ||
|
|
5560e1e861 | ||
|
|
2eeee3566f |
@@ -1 +0,0 @@
|
||||
0
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,12 +0,0 @@
|
||||
*.o
|
||||
*.o.d
|
||||
*.lo
|
||||
*.so
|
||||
*.a
|
||||
libpri.so.*
|
||||
pridump
|
||||
pritest
|
||||
rosetest
|
||||
testprilib
|
||||
version.c
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[gerrit]
|
||||
host=gerrit.asterisk.org
|
||||
port=29418
|
||||
project=libpri.git
|
||||
@@ -1 +0,0 @@
|
||||
0
|
||||
305
ChangeLog
305
ChangeLog
@@ -1,308 +1,3 @@
|
||||
2017-01-27 16:25 +0000 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* libpri 1.6.0 Released.
|
||||
|
||||
2016-10-31 23:59 +0000 [c038af7892] Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
|
||||
* Makefile: Use CPPFLAGS
|
||||
|
||||
* Include the value of CPPFLAGS in CFLAGS
|
||||
|
||||
Change-Id: Id8e6f3a231bf7581f3f37576b9ee6849ed59540a
|
||||
|
||||
2016-10-04 14:27 +0000 [f8e6096bfe] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Lucent switch implementation bug workaround (Part 2)
|
||||
|
||||
Work around a bug in a Lucent switch implementation that sets the
|
||||
extension bit in octet 3 even though octet 3a is present.
|
||||
|
||||
The same issue was seen in a NI2 switch implementation. It was probably a
|
||||
Lucent switch configured for NI2 operation. To avoid further surprises,
|
||||
I'm going to enable the work around for all North American switch types.
|
||||
|
||||
PRI-183
|
||||
Reported by: Richard Mudgett
|
||||
|
||||
Change-Id: I7eedbf68b7c3d9c868d9533012e4cea5142af281
|
||||
|
||||
2016-07-01 13:07 +0000 [d2585d6da2] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Lucent switch implementation bug workaround.
|
||||
|
||||
A bug in a Lucent switch implementation sets the Connected Number
|
||||
information element octet 3 extension bit. When set that means octet 3 is
|
||||
complete and thus there is no optional octet 3a. However, the buggy
|
||||
switch still sends octet 3a. The unexpected octet 3a is interpreted as
|
||||
the first octet 4 and thus the first character in the connected line
|
||||
number is a garbage character.
|
||||
|
||||
* Work around the switch bug by checking octet 3 and the potential octet
|
||||
3a extension bits. If they are both set then assume that octet 3a is
|
||||
actually present for the buggy switch types.
|
||||
|
||||
PRI-183 #close
|
||||
Reported by: Richard Mudgett
|
||||
|
||||
Change-Id: I378af37bfd852737a0bfe6263ef3473ea6acfbad
|
||||
|
||||
2016-06-30 20:15 +0000 [90019b935a] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Add number ie specification references.
|
||||
|
||||
Change-Id: I0d15804963501d1e4063a581db756ff26513065b
|
||||
|
||||
2016-03-25 20:59 +0000 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* libpri 1.5.0 Released.
|
||||
|
||||
2016-03-25 15:58 +0000 [44b1082a1e] Kevin Harwell <kharwell@lunkwill>
|
||||
|
||||
* Release summaries: Add summaries for 1.5.0
|
||||
|
||||
2016-03-25 15:58 +0000 [9a90caa65e] Kevin Harwell <kharwell@lunkwill>
|
||||
|
||||
* .version: Update for 1.5.0
|
||||
|
||||
2016-03-25 15:58 +0000 [5414ca525e] Kevin Harwell <kharwell@lunkwill>
|
||||
|
||||
* .lastclean: Update for 1.5.0
|
||||
|
||||
2016-03-24 14:55 +0000 [c71499df29] Kevin Harwell <kharwell@digium.com>
|
||||
|
||||
* Adding .cleancount and .gitreview files
|
||||
|
||||
Change-Id: I0e5accd0e43c049578241b2841fc2efa821c24f4
|
||||
|
||||
2016-03-15 16:22 +0000 [2952e95715] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Fix DISCONNECT Progress Indicator ie handling.
|
||||
|
||||
There are two scenarios that are exposed by DISCONNECT not initializing
|
||||
the progress indicator value before processing the message when the
|
||||
chan_dahdi.conf inbanddisconnect=yes option is set.
|
||||
|
||||
1) If a DISCONNECT comes in without a Progress Indicator ie and an earlier
|
||||
message (such as SETUP-ACKNOWLEDGE or PROCEEDING) came in with the
|
||||
indicator #8 (Inband audio present) then the DISCONNECT would not cause an
|
||||
immediate hangup. We would be letting the user hear the inband audio even
|
||||
though there isn't any.
|
||||
|
||||
2) If a DISCONNECT message comes in with the indicator #8 (Inband audio
|
||||
present) and then later the DISCONNECT message is repeated without a
|
||||
Progress Indicator ie we would still ignore the second DISCONNECT to let
|
||||
the user hear inband audio even though it likely isn't there anymore.
|
||||
|
||||
PRI-180 #close
|
||||
Reported by: Alexandr Dranchuk
|
||||
|
||||
Change-Id: Ic88aafb45053146b5701d666e6212f7555573624
|
||||
|
||||
2016-03-16 13:08 +0000 [7da3366cec] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Substitute PROGRESS for DISCONNECT with progress indicator #8
|
||||
|
||||
When the pri_set_inbanddisconnect() option is enabled and the call has not
|
||||
been answered when a DISCONNECT with progress indicator #8 (Inband audio
|
||||
present) is received, then report the event as a PROGRESS with progress
|
||||
indicator #8 (Inband audio present) instead. Substituting a PROGRESS
|
||||
event allows the upper layer to open the media path if it isn't already
|
||||
open so the user can hear the inband audio message.
|
||||
|
||||
PRI-180
|
||||
Reported by: Alexandr Dranchuk
|
||||
|
||||
Change-Id: I62313bf9cc1d2f3b0231f0c07a784717ddba0415
|
||||
|
||||
2016-03-16 12:57 +0000 [734e922301] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* Add .gitignore
|
||||
|
||||
Change-Id: I11ac3b47a9d5d0a0c1ea4559280b75ef5d866d62
|
||||
|
||||
2016-02-17 14:21 +0000 [a9722804c1] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Tighten mandatory ie checks.
|
||||
|
||||
Libpri was lax in checking if a missing channel identification ie is
|
||||
mandatory for the SETUP ACKNOWLEDGE, PROCEEDING, ALERTING, and CONNECT
|
||||
messages. That ie is mandatory when those messages are the first response
|
||||
to a SETUP message sent by the CPE side.
|
||||
|
||||
* Made those messages check if a missing channel identification ie is
|
||||
mandatory and send a STATUS with cause 96 "Mandatory information element
|
||||
is missing" in response.
|
||||
|
||||
Libpri did not care if a mandatory ie had a coding error.
|
||||
|
||||
* Made coding errors in mandatory ie's send a STATUS with cause 100
|
||||
"Invalid information element contents" in response.
|
||||
|
||||
* Fixed detection of coding errors in channel identification ie.
|
||||
|
||||
SWP-8721
|
||||
SWP-8722
|
||||
|
||||
|
||||
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2337 2fbb986a-6c06-0410-b554-c9c1f0a7f128
|
||||
|
||||
2016-02-09 15:46 +0000 [6b2cc87b30] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Update ALERTING_NO_PROGRESS conditional code.
|
||||
|
||||
The conditional is to only remove the Progress Indicator ie from being
|
||||
added to select messages.
|
||||
|
||||
* Made so the ALERTING message can have the User-User ie if needed when
|
||||
ALERTING_NO_PROGRESS is defined.
|
||||
|
||||
|
||||
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2335 2fbb986a-6c06-0410-b554-c9c1f0a7f128
|
||||
|
||||
2014-11-17 17:26 +0000 [fc96191788] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Made not recognize ie 0x01 for switches other than 4ESS, 5ESS, NI2, and DMS-100.
|
||||
|
||||
An incoming SETUP message needs to reject the invalid ie 0x01 on switches
|
||||
other than 4ESS, 5ESS, NI2, and DMS-100.
|
||||
|
||||
LIBPRI-74 #close
|
||||
Reported by: Richard Mudgett
|
||||
|
||||
|
||||
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2333 2fbb986a-6c06-0410-b554-c9c1f0a7f128
|
||||
|
||||
2014-11-17 14:07 +0000 [5fda3d8c68] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Send STATUS messages when receiving messages in the wrong call state.
|
||||
|
||||
* Add checks to send STATUS messages when receiving SETUP ACKNOWLEDGE,
|
||||
ALERTING, and CONNECT ACKNOWLEDGE messages when in the wrong call state.
|
||||
|
||||
LIBPRI-76 #close
|
||||
Reported by: Richard Mudgett
|
||||
|
||||
|
||||
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2331 2fbb986a-6c06-0410-b554-c9c1f0a7f128
|
||||
|
||||
2014-11-04 16:19 +0000 [af8a550ff9] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q921.c: Send DM and DISC frames with only three data octets instead of an extra fourth octet.
|
||||
|
||||
|
||||
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2329 2fbb986a-6c06-0410-b554-c9c1f0a7f128
|
||||
|
||||
2014-08-18 17:44 +0000 [a50516c1e4] Gerald Schnabel
|
||||
|
||||
* q931.c: Make always post a PRI_EVENT_KEYPAD_DIGIT if keypad digits come in an INFO message.
|
||||
|
||||
Q.931 Section 3.1.6 INFORMATION message. The keypad-facility or
|
||||
called-party-number ie could be used to convey called party digits. The
|
||||
keypad-facility ie can also be used to convey supplementary service
|
||||
information.
|
||||
|
||||
PRI-173 #close
|
||||
Reported by: Gerald Schnabel
|
||||
Patches:
|
||||
libpri_q931_keypad_digits.patch (license #6297) patch uploaded by Gerald Schnabel
|
||||
|
||||
|
||||
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2327 2fbb986a-6c06-0410-b554-c9c1f0a7f128
|
||||
|
||||
2014-06-16 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* libpri 1.4.15 Released.
|
||||
|
||||
2014-06-02 16:27 +0000 [r2322] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* pri.c: Adjust T202 default value to the minimum. The minimum T202
|
||||
time specified in Q.921 Section 5.9.7 is 2 seconds. It makes
|
||||
sense to set the value to the minimum 2 seconds in order to more
|
||||
likely get a TEI value before an outgoing call request aborts
|
||||
from T303 timeouts. PRI-171 #close Reported by: dcolombo
|
||||
|
||||
2014-05-12 22:45 +0000 [r2320] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* pri_q931.h, q931.c, libpri.h, pri.c: libpri: Add control of
|
||||
inband audio progress indication ie to the SETUP_ACKNOWLEDGE
|
||||
message. Added support to the libpri API to control the inband
|
||||
audio available progress indication ie on the SETUP_ACKNOWLEDGE
|
||||
message. * Added the progress indication ie progressmask value to
|
||||
the struct pri_event_setup_ack so the PRI_EVENT_SETUP_ACK event
|
||||
can indicate when a SETUP_ACKNOWLEDGE comes in with inband audio
|
||||
(ie dialtone). * Added pri_setup_ack() so when the
|
||||
SETUP_ACKNOWLEDGE message is sent it can indicate if inband audio
|
||||
is present (ie dialtone). This patch and a corresponding change
|
||||
in Asterisk work together to allow Asterisk to control the inband
|
||||
audio available progress indication ie on the SETUP_ACKNOWLEDGE
|
||||
message when dialtone is present. AST-1338 #close Reported by:
|
||||
Tyler Stewart Review: https://reviewboard.asterisk.org/r/3520/
|
||||
|
||||
2014-04-18 17:44 +0000 [r2318] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q921.c: libpri: Make TE-PTP mode respond to MDL TEI check
|
||||
requests. Some BRI devices in France insist on checking TEI's
|
||||
when in point-to-point mode. If they don't get a response for TEI
|
||||
0 they drop layer 1 even though libpri keeps trying to bring
|
||||
layer 2 up. * Made q921_mdl_receive() handle TEI check request
|
||||
messages in TE-PTP mode. Had to change
|
||||
q921_mdl_send()/Q921_INIT() because the PTP modes do not setup a
|
||||
link structure specifically for MDL as the PTMP modes do. * Fixed
|
||||
q921_tei_check()/t201_expire() to check TEI's even if the network
|
||||
side doesn't have any assigned. This should make TE's that
|
||||
request the TEI verify procedure (Q.921 Section 5.3.5) happy when
|
||||
the network side doesn't have any TEI's allocated. PRI-165
|
||||
Reported by: Denis Alberto Martinez Patches:
|
||||
jira_pri_165_ptp_respond_tei_check.patch (license #5621) patch
|
||||
uploaded by rmudgett Review:
|
||||
https://reviewboard.asterisk.org/r/3434/
|
||||
|
||||
2013-03-28 16:40 +0000 [r2315] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q921.c: Fix hole in layer2_persistence option for TE PTMP links.
|
||||
If the network stops responding, according to Q.921 we are
|
||||
supposed to remove the TEI. With the layer2_persistence option
|
||||
enabled, we are supposed to keep trying to bring layer 2 back up.
|
||||
Unfortunately, when the network stops responding, we stopped the
|
||||
restart timer and removed the TEI. As a result, layer 2 does not
|
||||
immediately come back up. * Made not stop the restart timer if we
|
||||
are removing the TEI on the CPE side. Also handle the timer
|
||||
expiration in relevant unassigned TEI states. (closes issue
|
||||
LIBPRI-72) Reported by: Trey Blancher Patches:
|
||||
jira_dahdi_1001_libpri_v1.4.patch (license #5621) patch uploaded
|
||||
by rmudgett
|
||||
|
||||
2012-12-20 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* libpri 1.4.14 Released.
|
||||
|
||||
2012-12-10 18:28 +0000 [r2310] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Handle optional Recommendation octet 3a in Cause IE. If
|
||||
the MSB of octet 3 is 0 then the optional Recommendation octet 3a
|
||||
is present. References: ITU-T Q.850 Section 2.1 and ETSI ETS 300
|
||||
102-1 Section 4.5.12. (closes issue PRI-151) Reported by: Tzafrir
|
||||
Cohen Patches:
|
||||
0001-handle-optional-Recommendation-in-Cause-IE.patch (license
|
||||
#5035) patch uploaded by Tzafrir Cohen Modified
|
||||
|
||||
2012-11-13 19:59 +0000 [r2307-2308] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* q931.c: Q.SIG: Allow PROGRESS when in the Active state. ECMA-143
|
||||
Section 10.1.7.2 indicates that PROGRESS is allowed when in the
|
||||
Active state. * Made Q.SIG ignore the PROGRESS message when in
|
||||
the Active call state. (closes issue PRI-147) Reported by: Nick
|
||||
Merrett
|
||||
|
||||
* q931.c: Fix compiler error with ALERTING_NO_PROGRESS define.
|
||||
|
||||
2012-10-29 21:19 +0000 [r2305] Richard Mudgett <rmudgett@digium.com>
|
||||
|
||||
* pritest.c: Fix compiler warning in pritest.c. * Made do_channel()
|
||||
exit on a failed write(). (closes issue PRI-145) Reported by:
|
||||
Tzafrir Cohen Patches: fix_unused_write.patch (license #5035)
|
||||
patch uploaded by Tzafrir Cohen Modified
|
||||
|
||||
2012-10-09 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* libpri 1.4.13 Released.
|
||||
|
||||
1
Makefile
1
Makefile
@@ -67,7 +67,6 @@ STATIC_OBJS= \
|
||||
DYNAMIC_OBJS= \
|
||||
$(STATIC_OBJS)
|
||||
CFLAGS ?= -g
|
||||
CFLAGS += $(CPPFLAGS)
|
||||
CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
|
||||
CFLAGS += -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
|
||||
INSTALL_PREFIX=$(DESTDIR)
|
||||
|
||||
123
libpri-1.4.13-summary.html
Normal file
123
libpri-1.4.13-summary.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - libpri-1.4.13</title></head>
|
||||
<body>
|
||||
<h1 align="center"><a name="top">Release Summary</a></h1>
|
||||
<h3 align="center">libpri-1.4.13</h3>
|
||||
<h3 align="center">Date: 2012-10-09</h3>
|
||||
<h3 align="center"><asteriskteam@digium.com></h3>
|
||||
<hr/>
|
||||
<h2 align="center">Table of Contents</h2>
|
||||
<ol>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
<li><a href="#contributors">Contributors</a></li>
|
||||
<li><a href="#issues">Closed Issues</a></li>
|
||||
<li><a href="#commits">Other Changes</a></li>
|
||||
<li><a href="#diffstat">Diffstat</a></li>
|
||||
</ol>
|
||||
<hr/>
|
||||
<a name="summary"><h2 align="center">Summary</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
|
||||
<p>The data in this summary reflects changes that have been made since the previous release, libpri-1.4.12.</p>
|
||||
<hr/>
|
||||
<a name="contributors"><h2 align="center">Contributors</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
|
||||
<table width="100%" border="0">
|
||||
<tr>
|
||||
<td width="33%"><h3>Coders</h3></td>
|
||||
<td width="33%"><h3>Testers</h3></td>
|
||||
<td width="33%"><h3>Reporters</h3></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
12 rmudgett<br/>
|
||||
1 kmoore<br/>
|
||||
1 Pavel<br/>
|
||||
1 Shaun<br/>
|
||||
1 Tzafrir<br/>
|
||||
</td>
|
||||
<td>
|
||||
4 rmudgett<br/>
|
||||
2 zvision<br/>
|
||||
</td>
|
||||
<td>
|
||||
2 tzafrir<br/>
|
||||
1 bcnx<br/>
|
||||
1 kowalma<br/>
|
||||
1 mboylan<br/>
|
||||
1 patrol-cz<br/>
|
||||
1 phsultan<br/>
|
||||
1 sruffell<br/>
|
||||
1 tsearle<br/>
|
||||
1 wimpy<br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
<a name="issues"><h2 align="center">Closed Issues</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
|
||||
<h3>Category: General</h3><br/>
|
||||
<a href="https://issues.asterisk.org/jira/browse/PRI-119">PRI-119</a>: [patch] Make PRI_DEBUG_Q921_RAW work independantly of PRI_DEBUG_Q921_DUMP<br/>
|
||||
Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2282">2282</a><br/>
|
||||
Reporter: wimpy<br/>
|
||||
Coders: kmoore<br/>
|
||||
<br/>
|
||||
<a href="https://issues.asterisk.org/jira/browse/PRI-137">PRI-137</a>: MDL/TEI warning messages while using PTP mode on BRI<br/>
|
||||
Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2290">2290</a><br/>
|
||||
Reporter: bcnx<br/>
|
||||
Coders: rmudgett<br/>
|
||||
<br/>
|
||||
<a href="https://issues.asterisk.org/jira/browse/PRI-139">PRI-139</a>: pri_pres2str() function returns wrong values<br/>
|
||||
Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2286">2286</a><br/>
|
||||
Reporter: patrol-cz<br/>
|
||||
Coders: Pavel<br/>
|
||||
<br/>
|
||||
<a href="https://issues.asterisk.org/jira/browse/PRI-143">PRI-143</a>: Fix "no return statement in function returning non-void" compile error.<br/>
|
||||
Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2298">2298</a><br/>
|
||||
Reporter: sruffell<br/>
|
||||
Coders: Shaun<br/>
|
||||
<br/>
|
||||
<a href="https://issues.asterisk.org/jira/browse/PRI-93">PRI-93</a>: E1 RESTART form interconnet partner on slot 1 does not restart whole span<br/>
|
||||
Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2277">2277</a><br/>
|
||||
Reporter: kowalma<br/>
|
||||
Testers: zvision, rmudgett<br/>
|
||||
Coders: rmudgett<br/>
|
||||
<br/>
|
||||
<h3>Category: NewFeature</h3><br/>
|
||||
<a href="https://issues.asterisk.org/jira/browse/PRI-71">PRI-71</a>: [patch] add basic slotmap support to RESTART messages<br/>
|
||||
Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2277">2277</a><br/>
|
||||
Reporter: tsearle<br/>
|
||||
Testers: zvision, rmudgett<br/>
|
||||
Coders: rmudgett<br/>
|
||||
<br/>
|
||||
<hr/>
|
||||
<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
|
||||
<table width="100%" border="1">
|
||||
<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2273">2273</a></td><td>rmudgett</td><td>Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2280">2280</a></td><td>rmudgett</td><td>Use ie2str(full_ie) where possible in q931.c.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2284">2284</a></td><td>rmudgett</td><td>Make number not available presentation also set screening to network provided.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2292">2292</a></td><td>rmudgett</td><td>Make pridump and testprilib compile again.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2294">2294</a></td><td>rmudgett</td><td>* Made no longer compile *.lo files they are identical to *.o files.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2295">2295</a></td><td>rmudgett</td><td>SVN ignore built utilities.</td>
|
||||
<td></td></tr></table>
|
||||
<hr/>
|
||||
<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
|
||||
<pre>
|
||||
Makefile | 80 ++----
|
||||
libpri.h | 28 ++
|
||||
pri.c | 64 ++++
|
||||
pri_cc.c | 3
|
||||
pri_facility.c | 13 -
|
||||
pri_internal.h | 29 ++
|
||||
pri_q921.h | 5
|
||||
pridump.c | 16 -
|
||||
q921.c | 395 +++++++++++++++++++-----------
|
||||
q931.c | 736 +++++++++++++++++++++++++++++++++++++++++----------------
|
||||
testprilib.c | 22 -
|
||||
11 files changed, 959 insertions(+), 432 deletions(-)
|
||||
</pre><br/>
|
||||
<hr/>
|
||||
</body>
|
||||
</html>
|
||||
167
libpri-1.4.13-summary.txt
Normal file
167
libpri-1.4.13-summary.txt
Normal file
@@ -0,0 +1,167 @@
|
||||
Release Summary
|
||||
|
||||
libpri-1.4.13
|
||||
|
||||
Date: 2012-10-09
|
||||
|
||||
<asteriskteam@digium.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Summary
|
||||
2. Contributors
|
||||
3. Closed Issues
|
||||
4. Other Changes
|
||||
5. Diffstat
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Summary
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This release includes only bug fixes. The changes included were made only
|
||||
to address problems that have been identified in this release series.
|
||||
Users should be able to safely upgrade to this version if this release
|
||||
series is already in use. Users considering upgrading from a previous
|
||||
release series are strongly encouraged to review the UPGRADE.txt document
|
||||
as well as the CHANGES document for information about upgrading to this
|
||||
release series.
|
||||
|
||||
The data in this summary reflects changes that have been made since the
|
||||
previous release, libpri-1.4.12.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Contributors
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This table lists the people who have submitted code, those that have
|
||||
tested patches, as well as those that reported issues on the issue tracker
|
||||
that were resolved in this release. For coders, the number is how many of
|
||||
their patches (of any size) were committed into this release. For testers,
|
||||
the number is the number of times their name was listed as assisting with
|
||||
testing a patch. Finally, for reporters, the number is the number of
|
||||
issues that they reported that were closed by commits that went into this
|
||||
release.
|
||||
|
||||
Coders Testers Reporters
|
||||
12 rmudgett 4 rmudgett 2 tzafrir
|
||||
1 kmoore 2 zvision 1 bcnx
|
||||
1 Pavel 1 kowalma
|
||||
1 Shaun 1 mboylan
|
||||
1 Tzafrir 1 patrol-cz
|
||||
1 phsultan
|
||||
1 sruffell
|
||||
1 tsearle
|
||||
1 wimpy
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Closed Issues
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all issues from the issue tracker that were closed by
|
||||
changes that went into this release.
|
||||
|
||||
Category: General
|
||||
|
||||
PRI-119: [patch] Make PRI_DEBUG_Q921_RAW work independantly of
|
||||
PRI_DEBUG_Q921_DUMP
|
||||
Revision: 2282
|
||||
Reporter: wimpy
|
||||
Coders: kmoore
|
||||
|
||||
PRI-137: MDL/TEI warning messages while using PTP mode on BRI
|
||||
Revision: 2290
|
||||
Reporter: bcnx
|
||||
Coders: rmudgett
|
||||
|
||||
PRI-139: pri_pres2str() function returns wrong values
|
||||
Revision: 2286
|
||||
Reporter: patrol-cz
|
||||
Coders: Pavel
|
||||
|
||||
PRI-143: Fix "no return statement in function returning non-void" compile
|
||||
error.
|
||||
Revision: 2298
|
||||
Reporter: sruffell
|
||||
Coders: Shaun
|
||||
|
||||
PRI-93: E1 RESTART form interconnet partner on slot 1 does not restart
|
||||
whole span
|
||||
Revision: 2277
|
||||
Reporter: kowalma
|
||||
Testers: zvision, rmudgett
|
||||
Coders: rmudgett
|
||||
|
||||
Category: NewFeature
|
||||
|
||||
PRI-71: [patch] add basic slotmap support to RESTART messages
|
||||
Revision: 2277
|
||||
Reporter: tsearle
|
||||
Testers: zvision, rmudgett
|
||||
Coders: rmudgett
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Commits Not Associated with an Issue
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all changes that went into this release that did not
|
||||
directly close an issue from the issue tracker. The commits may have been
|
||||
marked as being related to an issue. If that is the case, the issue
|
||||
numbers are listed here, as well.
|
||||
|
||||
+------------------------------------------------------------------------+
|
||||
| Revision | Author | Summary | Issues |
|
||||
| | | | Referenced |
|
||||
|----------+----------+-------------------------------------+------------|
|
||||
| | | Outgoing BRI calls fail when using | |
|
||||
| 2273 | rmudgett | Asterisk 1.8 with HA8, HB8, and | |
|
||||
| | | B410P cards. | |
|
||||
|----------+----------+-------------------------------------+------------|
|
||||
| 2280 | rmudgett | Use ie2str(full_ie) where possible | |
|
||||
| | | in q931.c. | |
|
||||
|----------+----------+-------------------------------------+------------|
|
||||
| | | Make number not available | |
|
||||
| 2284 | rmudgett | presentation also set screening to | |
|
||||
| | | network provided. | |
|
||||
|----------+----------+-------------------------------------+------------|
|
||||
| 2292 | rmudgett | Make pridump and testprilib compile | |
|
||||
| | | again. | |
|
||||
|----------+----------+-------------------------------------+------------|
|
||||
| 2294 | rmudgett | * Made no longer compile *.lo files | |
|
||||
| | | they are identical to *.o files. | |
|
||||
|----------+----------+-------------------------------------+------------|
|
||||
| 2295 | rmudgett | SVN ignore built utilities. | |
|
||||
+------------------------------------------------------------------------+
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Diffstat Results
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a summary of the changes to the source code that went into this
|
||||
release that was generated using the diffstat utility.
|
||||
|
||||
Makefile | 80 ++----
|
||||
libpri.h | 28 ++
|
||||
pri.c | 64 ++++
|
||||
pri_cc.c | 3
|
||||
pri_facility.c | 13 -
|
||||
pri_internal.h | 29 ++
|
||||
pri_q921.h | 5
|
||||
pridump.c | 16 -
|
||||
q921.c | 395 +++++++++++++++++++-----------
|
||||
q931.c | 736 +++++++++++++++++++++++++++++++++++++++++----------------
|
||||
testprilib.c | 22 -
|
||||
11 files changed, 959 insertions(+), 432 deletions(-)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><title>Release Summary - libpri-1.6.0</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">libpri-1.6.0</h3><h3 align="center">Date: 2017-01-27</h3><h3 align="center"><asteriskteam@digium.com></h3><hr><h2 align="center">Table of Contents</h2><ol>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
<li><a href="#contributors">Contributors</a></li>
|
||||
<li><a href="#closed_issues">Closed Issues</a></li>
|
||||
<li><a href="#commits">Other Changes</a></li>
|
||||
<li><a href="#diffstat">Diffstat</a></li>
|
||||
</ol><hr><a name="summary"><h2 align="center">Summary</h2></a><center><a href="#top">[Back to Top]</a></center><p>This release is a point release of an existing major version. The changes included were made to address problems that have been identified in this release series, or are minor, backwards compatible new features or improvements. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous version are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p><p>The data in this summary reflects changes that have been made since the previous release, libpri-1.5.0.</p><hr><a name="contributors"><h2 align="center">Contributors</h2></a><center><a href="#top">[Back to Top]</a></center><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were affected by commits that went into this release.</p><table width="100%" border="0">
|
||||
<tr><th width="33%">Coders</th><th width="33%">Testers</th><th width="33%">Reporters</th></tr>
|
||||
<tr valign="top"><td width="33%">3 Richard Mudgett <rmudgett@digium.com><br/>1 Tzafrir Cohen <tzafrir.cohen@xorcom.com><br/></td><td width="33%"><td width="33%">2 Richard Mudgett <rmudgett@digium.com><br/>2 Richard Mudgett<br/></td></tr>
|
||||
</table><hr><a name="closed_issues"><h2 align="center">Closed Issues</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p><h3>Bug</h3><h4>Category: General</h4><a href="https://issues.asterisk.org/jira/browse/PRI-183">PRI-183</a>: Garbage character in the received connected line number from a Lucent 5ESS switch.<br/>Reported by: Richard Mudgett<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/libpri?cs=f8e6096bfec3507895c8d7db91e78871ee47c6fe">[f8e6096bfe]</a> Richard Mudgett -- q931.c: Lucent switch implementation bug workaround (Part 2)</li>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/libpri?cs=d2585d6da2d30f116ef99339f79ce502f78697d4">[d2585d6da2]</a> Richard Mudgett -- q931.c: Lucent switch implementation bug workaround.</li>
|
||||
</ul><br><hr><a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all changes that went into this release that did not reference a JIRA issue.</p><table width="100%" border="1">
|
||||
<tr><th>Revision</th><th>Author</th><th>Summary</th></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/libpri?cs=c038af789232458942020dd64f0c09a1bb4d78b9">c038af7892</a></td><td>Tzafrir Cohen</td><td>Makefile: Use CPPFLAGS</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/libpri?cs=90019b935a16240afee3f1e2f5649081b2999199">90019b935a</a></td><td>Richard Mudgett</td><td>q931.c: Add number ie specification references.</td></tr>
|
||||
</table><hr><a name="diffstat"><h2 align="center">Diffstat Results</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p><pre>.lastclean | 1
|
||||
.version | 1
|
||||
ChangeLog | 2213 ----------------------------------------------
|
||||
b/Makefile | 1
|
||||
b/q931.c | 6
|
||||
libpri-1.5.0-summary.html | 38
|
||||
libpri-1.5.0-summary.txt | 141 --
|
||||
7 files changed, 6 insertions(+), 2395 deletions(-)</pre><br></html>
|
||||
@@ -1,111 +0,0 @@
|
||||
Release Summary
|
||||
|
||||
libpri-1.6.0
|
||||
|
||||
Date: 2017-01-27
|
||||
|
||||
<asteriskteam@digium.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Summary
|
||||
2. Contributors
|
||||
3. Closed Issues
|
||||
4. Other Changes
|
||||
5. Diffstat
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Summary
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This release is a point release of an existing major version. The changes
|
||||
included were made to address problems that have been identified in this
|
||||
release series, or are minor, backwards compatible new features or
|
||||
improvements. Users should be able to safely upgrade to this version if
|
||||
this release series is already in use. Users considering upgrading from a
|
||||
previous version are strongly encouraged to review the UPGRADE.txt
|
||||
document as well as the CHANGES document for information about upgrading
|
||||
to this release series.
|
||||
|
||||
The data in this summary reflects changes that have been made since the
|
||||
previous release, libpri-1.5.0.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Contributors
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This table lists the people who have submitted code, those that have
|
||||
tested patches, as well as those that reported issues on the issue tracker
|
||||
that were resolved in this release. For coders, the number is how many of
|
||||
their patches (of any size) were committed into this release. For testers,
|
||||
the number is the number of times their name was listed as assisting with
|
||||
testing a patch. Finally, for reporters, the number is the number of
|
||||
issues that they reported that were affected by commits that went into
|
||||
this release.
|
||||
|
||||
Coders Testers Reporters
|
||||
3 Richard Mudgett 2 Richard Mudgett
|
||||
1 Tzafrir Cohen 2 Richard Mudgett
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Closed Issues
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all issues from the issue tracker that were closed by
|
||||
changes that went into this release.
|
||||
|
||||
Bug
|
||||
|
||||
Category: General
|
||||
|
||||
PRI-183: Garbage character in the received connected line number from a
|
||||
Lucent 5ESS switch.
|
||||
Reported by: Richard Mudgett
|
||||
* [f8e6096bfe] Richard Mudgett -- q931.c: Lucent switch implementation
|
||||
bug workaround (Part 2)
|
||||
* [d2585d6da2] Richard Mudgett -- q931.c: Lucent switch implementation
|
||||
bug workaround.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Commits Not Associated with an Issue
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all changes that went into this release that did not
|
||||
reference a JIRA issue.
|
||||
|
||||
+------------------------------------------------------------------------+
|
||||
| Revision | Author | Summary |
|
||||
|------------+-----------------+-----------------------------------------|
|
||||
| c038af7892 | Tzafrir Cohen | Makefile: Use CPPFLAGS |
|
||||
|------------+-----------------+-----------------------------------------|
|
||||
| 90019b935a | Richard Mudgett | q931.c: Add number ie specification |
|
||||
| | | references. |
|
||||
+------------------------------------------------------------------------+
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Diffstat Results
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a summary of the changes to the source code that went into this
|
||||
release that was generated using the diffstat utility.
|
||||
|
||||
.lastclean | 1
|
||||
.version | 1
|
||||
ChangeLog | 2213 ----------------------------------------------
|
||||
b/Makefile | 1
|
||||
b/q931.c | 6
|
||||
libpri-1.5.0-summary.html | 38
|
||||
libpri-1.5.0-summary.txt | 141 --
|
||||
7 files changed, 6 insertions(+), 2395 deletions(-)
|
||||
66
libpri.h
66
libpri.h
@@ -1213,7 +1213,6 @@ typedef struct pri_event_setup_ack {
|
||||
int channel;
|
||||
q931_call *call;
|
||||
struct pri_subcommands *subcmds;
|
||||
int progressmask;
|
||||
} pri_event_setup_ack;
|
||||
|
||||
typedef struct pri_event_notify {
|
||||
@@ -1409,17 +1408,8 @@ const char *pri_facility_error2str(int facility_error_code);
|
||||
*/
|
||||
const char *pri_facility_reject2str(int facility_reject_code);
|
||||
|
||||
/*!
|
||||
* \brief Send the ALERTING message.
|
||||
*
|
||||
* \param pri D channel controller.
|
||||
* \param call Q.931 call leg.
|
||||
* \param channel Encoded channel id to use. If zero do not change channel id.
|
||||
* \param info Nonzero to include a progress ie indicating inband audio available (ie ringback).
|
||||
*
|
||||
* \retval 0 on success.
|
||||
* \retval -1 on error.
|
||||
*/
|
||||
/* Acknowledge a call and place it on the given channel. Set info to non-zero if there
|
||||
is in-band data available on the channel */
|
||||
int pri_acknowledge(struct pri *pri, q931_call *call, int channel, int info);
|
||||
|
||||
/* Send a digit in overlap mode */
|
||||
@@ -1429,44 +1419,12 @@ int pri_information(struct pri *pri, q931_call *call, char digit);
|
||||
/* Send a keypad facility string of digits */
|
||||
int pri_keypad_facility(struct pri *pri, q931_call *call, const char *digits);
|
||||
|
||||
/*!
|
||||
* \brief Send the SETUP_ACKNOWLEDGE message.
|
||||
*
|
||||
* \param pri D channel controller.
|
||||
* \param call Q.931 call leg.
|
||||
* \param channel Encoded channel id to use. If zero do not change channel id.
|
||||
* \param nonisdn Nonzero to include a progress ie indicating non-end-to-end-ISDN.
|
||||
*
|
||||
* \retval 0 on success.
|
||||
* \retval -1 on error.
|
||||
*/
|
||||
/* Answer the incomplete(call without called number) call on the given channel.
|
||||
Set non-isdn to non-zero if you are not connecting to ISDN equipment */
|
||||
int pri_need_more_info(struct pri *pri, q931_call *call, int channel, int nonisdn);
|
||||
|
||||
/*!
|
||||
* \brief Send the SETUP_ACKNOWLEDGE message.
|
||||
*
|
||||
* \param ctrl D channel controller.
|
||||
* \param call Q.931 call leg.
|
||||
* \param channel Encoded channel id to use. If zero do not change channel id.
|
||||
* \param nonisdn Nonzero to include a progress ie indicating non-end-to-end-ISDN.
|
||||
* \param inband Nonzero to include a progress ie indicating inband audio available (ie dialtone).
|
||||
*
|
||||
* \retval 0 on success.
|
||||
* \retval -1 on error.
|
||||
*/
|
||||
int pri_setup_ack(struct pri *ctrl, q931_call *call, int channel, int nonisdn, int inband);
|
||||
|
||||
/*!
|
||||
* \brief Send the CONNECT message.
|
||||
*
|
||||
* \param pri D channel controller.
|
||||
* \param call Q.931 call leg.
|
||||
* \param channel Encoded channel id to use. If zero do not change channel id.
|
||||
* \param nonisdn Nonzero to include a progress ie indicating non-end-to-end-ISDN.
|
||||
*
|
||||
* \retval 0 on success.
|
||||
* \retval -1 on error.
|
||||
*/
|
||||
/* Answer(CONNECT) the call on the given channel.
|
||||
Set non-isdn to non-zero if you are not connecting to ISDN equipment */
|
||||
int pri_answer(struct pri *pri, q931_call *call, int channel, int nonisdn);
|
||||
|
||||
/*!
|
||||
@@ -1734,17 +1692,7 @@ int pri_progress(struct pri *pri, q931_call *c, int channel, int info);
|
||||
int pri_progress_with_cause(struct pri *pri, q931_call *c, int channel, int info, int cause);
|
||||
|
||||
#define PRI_PROCEEDING_FULL
|
||||
/*!
|
||||
* \brief Send the PROCEEDING message.
|
||||
*
|
||||
* \param pri D channel controller.
|
||||
* \param c Q.931 call leg.
|
||||
* \param channel Encoded channel id to use. If zero do not change channel id.
|
||||
* \param info Nonzero to include a progress ie indicating inband audio available.
|
||||
*
|
||||
* \retval 0 on success.
|
||||
* \retval -1 on error.
|
||||
*/
|
||||
/* Send call proceeding */
|
||||
int pri_proceeding(struct pri *pri, q931_call *c, int channel, int info);
|
||||
|
||||
/* Enable inband progress when a DISCONNECT is received */
|
||||
|
||||
12
pri.c
12
pri.c
@@ -176,7 +176,7 @@ static void pri_default_timers(struct pri *ctrl, int switchtype)
|
||||
|
||||
ctrl->timers[PRI_TIMER_T200] = 1000; /* Time between SABME's */
|
||||
ctrl->timers[PRI_TIMER_T201] = ctrl->timers[PRI_TIMER_T200];/* Time between TEI Identity Checks (Default same as T200) */
|
||||
ctrl->timers[PRI_TIMER_T202] = 2 * 1000; /* Min time between transmission of TEI Identity request messages */
|
||||
ctrl->timers[PRI_TIMER_T202] = 10 * 1000; /* Min time between transmission of TEI Identity request messages */
|
||||
ctrl->timers[PRI_TIMER_T203] = 10 * 1000; /* Max time without exchanging packets */
|
||||
|
||||
ctrl->timers[PRI_TIMER_T303] = 4 * 1000; /* Length between SETUP retransmissions and timeout */
|
||||
@@ -939,15 +939,7 @@ int pri_need_more_info(struct pri *pri, q931_call *call, int channel, int nonisd
|
||||
if (!pri || !pri_is_call_valid(pri, call)) {
|
||||
return -1;
|
||||
}
|
||||
return q931_setup_ack(pri, call, channel, nonisdn, 0);
|
||||
}
|
||||
|
||||
int pri_setup_ack(struct pri *ctrl, q931_call *call, int channel, int nonisdn, int inband)
|
||||
{
|
||||
if (!ctrl || !pri_is_call_valid(ctrl, call)) {
|
||||
return -1;
|
||||
}
|
||||
return q931_setup_ack(ctrl, call, channel, nonisdn, inband);
|
||||
return q931_setup_ack(pri, call, channel, nonisdn);
|
||||
}
|
||||
|
||||
int pri_answer(struct pri *pri, q931_call *call, int channel, int nonisdn)
|
||||
|
||||
@@ -647,13 +647,10 @@ struct q931_call {
|
||||
unsigned char char_set;
|
||||
} display;
|
||||
|
||||
/*! AOC charge requesting on Setup */
|
||||
/* AOC charge requesting on Setup */
|
||||
int aoc_charging_request;
|
||||
|
||||
/*! TRUE if the slotmap is E1 (32 bits). */
|
||||
unsigned int slotmap_size:1;
|
||||
/*! TRUE if need to see the channel id ie in first response to SETUP. */
|
||||
unsigned int channel_id_ie_mandatory:1;
|
||||
unsigned int slotmap_size:1;/* TRUE if the slotmap is E1 (32 bits). */
|
||||
|
||||
/*! Control the RESTART reception to the upper layer. */
|
||||
struct {
|
||||
|
||||
@@ -138,6 +138,9 @@ typedef struct q931_ie {
|
||||
#define SERVICE_CHANGE_STATUS_REQCONTINUITYCHECK 3 /* not supported */
|
||||
#define SERVICE_CHANGE_STATUS_SHUTDOWN 4 /* not supported */
|
||||
|
||||
/* Special codeset 0 IE */
|
||||
#define NATIONAL_CHANGE_STATUS 0x1
|
||||
|
||||
/* Q.931 / National ISDN Information Elements */
|
||||
#define Q931_LOCKING_SHIFT 0x90
|
||||
#define Q931_NON_LOCKING_SHIFT 0x98
|
||||
@@ -465,7 +468,7 @@ extern int q931_notify(struct pri *pri, q931_call *call, int channel, int info);
|
||||
|
||||
extern int q931_call_proceeding(struct pri *pri, q931_call *call, int channel, int info);
|
||||
|
||||
extern int q931_setup_ack(struct pri *ctrl, q931_call *c, int channel, int nonisdn, int inband);
|
||||
extern int q931_setup_ack(struct pri *pri, q931_call *call, int channel, int nonisdn);
|
||||
|
||||
extern int q931_information(struct pri *pri, q931_call *call, char digit);
|
||||
|
||||
|
||||
@@ -68,10 +68,7 @@ static void do_channel(int fd)
|
||||
int i=0;
|
||||
|
||||
while ((res = read(fd, buf, READ_SIZE)) > 0 && (i++ < 1000)) {
|
||||
if (write(fd, buf, res) == -1) {
|
||||
fprintf(stderr, "--!! Failed write: %d\n", errno);
|
||||
break;
|
||||
}
|
||||
write(fd, buf, res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
214
q921.c
214
q921.c
@@ -45,19 +45,13 @@
|
||||
*/
|
||||
//#define RANDOM_DROPS 1
|
||||
|
||||
#define Q921_INIT(fr, l_sapi, l_tei) \
|
||||
do { \
|
||||
(fr)->h.sapi = l_sapi; \
|
||||
(fr)->h.ea1 = 0; \
|
||||
(fr)->h.ea2 = 1; \
|
||||
(fr)->h.tei = l_tei; \
|
||||
} while (0)
|
||||
|
||||
#define Q921_CLEAR_INIT(fr, l_sapi, l_tei) \
|
||||
do { \
|
||||
memset((fr), 0, sizeof(*(fr))); \
|
||||
Q921_INIT((fr), (l_sapi), (l_tei)); \
|
||||
} while (0)
|
||||
#define Q921_INIT(link, hf) do { \
|
||||
memset(&(hf),0,sizeof(hf)); \
|
||||
(hf).h.sapi = (link)->sapi; \
|
||||
(hf).h.ea1 = 0; \
|
||||
(hf).h.ea2 = 1; \
|
||||
(hf).h.tei = (link)->tei; \
|
||||
} while (0)
|
||||
|
||||
static void q921_dump_pri(struct q921_link *link, char direction_tag);
|
||||
static void q921_establish_data_link(struct q921_link *link);
|
||||
@@ -202,14 +196,17 @@ static int q921_transmit(struct pri *ctrl, q921_h *h, int len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void q921_mdl_send(struct pri *ctrl, enum q921_tei_identity message, int ri, int ai, int iscommand)
|
||||
static void q921_send_tei(struct pri *ctrl, enum q921_tei_identity message, int ri, int ai, int iscommand)
|
||||
{
|
||||
q921_u *f;
|
||||
struct q921_link *link;
|
||||
|
||||
link = &ctrl->link;
|
||||
|
||||
if (!(f = calloc(1, sizeof(*f) + 5)))
|
||||
return;
|
||||
|
||||
Q921_INIT(f, Q921_SAPI_LAYER2_MANAGEMENT, Q921_TEI_GROUP);
|
||||
Q921_INIT(link, *f);
|
||||
f->h.c_r = (ctrl->localtype == PRI_NETWORK) ? iscommand : !iscommand;
|
||||
f->ft = Q921_FRAMETYPE_U;
|
||||
f->data[0] = 0x0f; /* Management entity */
|
||||
@@ -219,7 +216,7 @@ static void q921_mdl_send(struct pri *ctrl, enum q921_tei_identity message, int
|
||||
f->data[4] = (ai << 1) | 1;
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl,
|
||||
"Sending MDL message: %d(%s), TEI=%d\n",
|
||||
"Sending TEI management message %d(%s), TEI=%d\n",
|
||||
message, q921_tei_mgmt2str(message), ai);
|
||||
}
|
||||
q921_transmit(ctrl, (q921_h *)f, 8);
|
||||
@@ -268,7 +265,7 @@ static void t202_expire(void *vlink)
|
||||
|
||||
/* Send TEI request */
|
||||
link->ri = random() % 65535;
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_REQUEST, link->ri, Q921_TEI_GROUP, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_REQUEST, link->ri, Q921_TEI_GROUP, 1);
|
||||
}
|
||||
|
||||
static void q921_tei_request(struct q921_link *link)
|
||||
@@ -283,8 +280,8 @@ static void q921_tei_remove(struct pri *ctrl, int tei)
|
||||
* Q.921 Section 5.3.2 says we should send the remove message
|
||||
* twice, in case of message loss.
|
||||
*/
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_REMOVE, 0, tei, 1);
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_REMOVE, 0, tei, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_REMOVE, 0, tei, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_REMOVE, 0, tei, 1);
|
||||
}
|
||||
|
||||
static void q921_send_dm(struct q921_link *link, int fbit)
|
||||
@@ -294,7 +291,7 @@ static void q921_send_dm(struct q921_link *link, int fbit)
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
Q921_CLEAR_INIT(&h, link->sapi, link->tei);
|
||||
Q921_INIT(link, h);
|
||||
h.u.m3 = 0; /* M3 = 0 */
|
||||
h.u.m2 = 3; /* M2 = 3 */
|
||||
h.u.p_f = fbit; /* Final set appropriately */
|
||||
@@ -313,7 +310,7 @@ static void q921_send_dm(struct q921_link *link, int fbit)
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "TEI=%d Sending DM\n", link->tei);
|
||||
}
|
||||
q921_transmit(ctrl, &h, 3);
|
||||
q921_transmit(ctrl, &h, 4);
|
||||
}
|
||||
|
||||
static void q921_send_disc(struct q921_link *link, int pbit)
|
||||
@@ -323,7 +320,7 @@ static void q921_send_disc(struct q921_link *link, int pbit)
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
Q921_CLEAR_INIT(&h, link->sapi, link->tei);
|
||||
Q921_INIT(link, h);
|
||||
h.u.m3 = 2; /* M3 = 2 */
|
||||
h.u.m2 = 0; /* M2 = 0 */
|
||||
h.u.p_f = pbit; /* Poll set appropriately */
|
||||
@@ -342,7 +339,7 @@ static void q921_send_disc(struct q921_link *link, int pbit)
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "TEI=%d Sending DISC\n", link->tei);
|
||||
}
|
||||
q921_transmit(ctrl, &h, 3);
|
||||
q921_transmit(ctrl, &h, 4);
|
||||
}
|
||||
|
||||
static void q921_send_ua(struct q921_link *link, int fbit)
|
||||
@@ -352,7 +349,7 @@ static void q921_send_ua(struct q921_link *link, int fbit)
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
Q921_CLEAR_INIT(&h, link->sapi, link->tei);
|
||||
Q921_INIT(link, h);
|
||||
h.u.m3 = 3; /* M3 = 3 */
|
||||
h.u.m2 = 0; /* M2 = 0 */
|
||||
h.u.p_f = fbit; /* Final set appropriately */
|
||||
@@ -381,7 +378,7 @@ static void q921_send_sabme(struct q921_link *link)
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
Q921_CLEAR_INIT(&h, link->sapi, link->tei);
|
||||
Q921_INIT(link, h);
|
||||
h.u.m3 = 3; /* M3 = 3 */
|
||||
h.u.m2 = 3; /* M2 = 3 */
|
||||
h.u.p_f = 1; /* Poll bit set */
|
||||
@@ -560,7 +557,7 @@ static void kick_start_link(struct q921_link *link)
|
||||
break;
|
||||
case Q921_ASSIGN_AWAITING_TEI:
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "Kick starting link when awaiting TEI.\n");
|
||||
pri_message(ctrl, "Kick starting link when get TEI.\n");
|
||||
}
|
||||
q921_setstate(link, Q921_ESTABLISH_AWAITING_TEI);
|
||||
break;
|
||||
@@ -589,8 +586,6 @@ static void restart_timer_expire(void *vlink)
|
||||
link->restart_timer = 0;
|
||||
|
||||
switch (link->state) {
|
||||
case Q921_TEI_UNASSIGNED:
|
||||
case Q921_ASSIGN_AWAITING_TEI:
|
||||
case Q921_TEI_ASSIGNED:
|
||||
/* Try to bring layer 2 up. */
|
||||
kick_start_link(link);
|
||||
@@ -812,7 +807,7 @@ static void q921_reject(struct q921_link *link, int pf)
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
Q921_CLEAR_INIT(&h, link->sapi, link->tei);
|
||||
Q921_INIT(link, h);
|
||||
h.s.x0 = 0; /* Always 0 */
|
||||
h.s.ss = 2; /* Reject */
|
||||
h.s.ft = 1; /* Frametype (01) */
|
||||
@@ -842,7 +837,7 @@ static void q921_rr(struct q921_link *link, int pbit, int cmd)
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
Q921_CLEAR_INIT(&h, link->sapi, link->tei);
|
||||
Q921_INIT(link, h);
|
||||
h.s.x0 = 0; /* Always 0 */
|
||||
h.s.ss = 0; /* Receive Ready */
|
||||
h.s.ft = 1; /* Frametype (01) */
|
||||
@@ -1069,7 +1064,7 @@ int q921_transmit_iframe(struct q921_link *link, void *buf, int len, int cr)
|
||||
|
||||
f = calloc(1, sizeof(struct q921_frame) + len + 2);
|
||||
if (f) {
|
||||
Q921_INIT(&f->h, link->sapi, link->tei);
|
||||
Q921_INIT(link, f->h);
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
if (cr)
|
||||
@@ -1399,6 +1394,12 @@ static void t201_expire(void *vctrl)
|
||||
|
||||
ctrl = vctrl;
|
||||
|
||||
if (!ctrl->link.next) {
|
||||
/* No TEI links remain. */
|
||||
ctrl->t201_timer = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Start the TEI check timer. */
|
||||
ctrl->t201_timer =
|
||||
pri_schedule_event(ctrl, ctrl->timers[PRI_TIMER_T201], t201_expire, ctrl);
|
||||
@@ -1459,7 +1460,7 @@ static void t201_expire(void *vctrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_CHECK_REQUEST, 0, Q921_TEI_GROUP, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_CHECK_REQUEST, 0, Q921_TEI_GROUP, 1);
|
||||
}
|
||||
|
||||
static void q921_tei_check(struct pri *ctrl)
|
||||
@@ -1472,19 +1473,7 @@ static void q921_tei_check(struct pri *ctrl)
|
||||
t201_expire(ctrl);
|
||||
}
|
||||
|
||||
static void q921_mdl_ignore(struct pri *ctrl, q921_u *h, const char *reason)
|
||||
{
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
/*
|
||||
* Send out this message in debug modes since it is possible the
|
||||
* user has misconfigured their link for the wrong mode.
|
||||
*/
|
||||
pri_message(ctrl, "Ignoring MDL message: %d(%s) %s\n",
|
||||
h->data[3], q921_tei_mgmt2str(h->data[3]), reason);
|
||||
}
|
||||
}
|
||||
|
||||
static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
static pri_event *q921_receive_MDL(struct pri *ctrl, q921_u *h, int len)
|
||||
{
|
||||
int ri;
|
||||
struct q921_link *sub;
|
||||
@@ -1494,13 +1483,32 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
int count;
|
||||
int tei;
|
||||
|
||||
if (!BRI_NT_PTMP(ctrl) && !BRI_TE_PTMP(ctrl)) {
|
||||
/*
|
||||
* Some telco switches send out MDL messages even though they
|
||||
* are configured for PTP. Usually they are checking for
|
||||
* assigned TEI's.
|
||||
*/
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
/*
|
||||
* Send out this message in debug modes since it is possible the
|
||||
* user has misconfigured their link for the wrong mode.
|
||||
*/
|
||||
pri_message(ctrl, "Not configured for PTMP. Ignoring MDL message: %d(%s)\n",
|
||||
h->data[3], q921_tei_mgmt2str(h->data[3]));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "Received MDL message\n");
|
||||
}
|
||||
if (len <= &h->data[0] - (u_int8_t *) h) {
|
||||
pri_error(ctrl, "Received short MDL frame\n");
|
||||
pri_error(ctrl, "Received short frame\n");
|
||||
return NULL;
|
||||
}
|
||||
if (h->data[0] != 0x0f) {
|
||||
pri_error(ctrl, "Received MDL with unsupported management entity %02x\n",
|
||||
h->data[0]);
|
||||
pri_error(ctrl, "Received MDL with unsupported management entity %02x\n", h->data[0]);
|
||||
return NULL;
|
||||
}
|
||||
if (len <= &h->data[4] - (u_int8_t *) h) {
|
||||
@@ -1509,20 +1517,8 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
}
|
||||
if (h->data[3] != Q921_TEI_IDENTITY_CHECK_RESPONSE
|
||||
&& !(h->data[4] & 0x01)) {
|
||||
pri_error(ctrl, "Received MDL message: %d(%s) with Ai E bit not set.\n",
|
||||
h->data[3], q921_tei_mgmt2str(h->data[3]));
|
||||
return NULL;
|
||||
}
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "Received MDL message: %d(%s)\n",
|
||||
h->data[3], q921_tei_mgmt2str(h->data[3]));
|
||||
}
|
||||
if (PTP_MODE(ctrl) && NT_MODE(ctrl)) {
|
||||
/*
|
||||
* We are not managing automatic TEI's in this mode so we can
|
||||
* ignore MDL messages from the CPE.
|
||||
*/
|
||||
q921_mdl_ignore(ctrl, h, "We are in NT-PTP mode.");
|
||||
pri_error(ctrl, "Received %d(%s) with Ai E bit not set.\n", h->data[3],
|
||||
q921_tei_mgmt2str(h->data[3]));
|
||||
return NULL;
|
||||
}
|
||||
ri = (h->data[1] << 8) | h->data[2];
|
||||
@@ -1531,14 +1527,13 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
switch (h->data[3]) {
|
||||
case Q921_TEI_IDENTITY_REQUEST:
|
||||
if (!BRI_NT_PTMP(ctrl)) {
|
||||
q921_mdl_ignore(ctrl, h, "We are not in NT-PTMP mode.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (tei != Q921_TEI_GROUP) {
|
||||
pri_error(ctrl, "Received %s with invalid TEI %d\n",
|
||||
q921_tei_mgmt2str(Q921_TEI_IDENTITY_REQUEST), tei);
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_DENIED, ri, tei, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_DENIED, ri, tei, 1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1553,7 +1548,7 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
break;
|
||||
}
|
||||
pri_error(ctrl, "TEI pool exhausted. Reclaiming dead TEIs.\n");
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_DENIED, ri, Q921_TEI_GROUP, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_DENIED, ri, Q921_TEI_GROUP, 1);
|
||||
q921_tei_check(ctrl);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1570,7 +1565,7 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
}
|
||||
sub->next = link;
|
||||
q921_setstate(link, Q921_TEI_ASSIGNED);
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_ASSIGNED, ri, tei, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_ASSIGNED, ri, tei, 1);
|
||||
|
||||
count = 0;
|
||||
for (sub = ctrl->link.next; sub; sub = sub->next) {
|
||||
@@ -1598,7 +1593,6 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_CHECK_RESPONSE:
|
||||
if (!BRI_NT_PTMP(ctrl)) {
|
||||
/* Silently ignore the message since we never asked for the check. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1646,7 +1640,6 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_VERIFY:
|
||||
if (!BRI_NT_PTMP(ctrl)) {
|
||||
q921_mdl_ignore(ctrl, h, "We are not in NT-PTMP mode.");
|
||||
return NULL;
|
||||
}
|
||||
if (tei == Q921_TEI_GROUP) {
|
||||
@@ -1657,20 +1650,11 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
q921_tei_check(ctrl);
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_ASSIGNED:
|
||||
if (NT_MODE(ctrl)) {
|
||||
/* We should not be receiving this message. */
|
||||
q921_mdl_ignore(ctrl, h, "We are the network.");
|
||||
return NULL;
|
||||
}
|
||||
if (!BRI_TE_PTMP(ctrl)) {
|
||||
/*
|
||||
* Silently ignore the message. It must not be for us
|
||||
* since we will never ask for one.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* We're operating on the specific TEI link here */
|
||||
/* Assuming we're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
|
||||
switch (link->state) {
|
||||
@@ -1740,52 +1724,29 @@ static pri_event *q921_mdl_receive(struct pri *ctrl, q921_u *h, int len)
|
||||
}
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_CHECK_REQUEST:
|
||||
if (NT_MODE(ctrl)) {
|
||||
/* We should not be receiving this message. */
|
||||
q921_mdl_ignore(ctrl, h, "We are the network.");
|
||||
if (!BRI_TE_PTMP(ctrl)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (PTP_MODE(ctrl)) {
|
||||
/*
|
||||
* Some telco switches/devices get very unhappy if we don't
|
||||
* respond to the TEI check request with our permanently
|
||||
* assigned TEI.
|
||||
*/
|
||||
link = &ctrl->link;
|
||||
} else if (BRI_TE_PTMP(ctrl)) {
|
||||
/* We're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
/* Assuming we're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
|
||||
if (link->state < Q921_TEI_ASSIGNED) {
|
||||
/* We do not have a TEI. */
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
/* Should never get here. */
|
||||
if (link->state < Q921_TEI_ASSIGNED) {
|
||||
/* We do not have a TEI. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* If it's addressed to the group TEI or to our TEI specifically, we respond */
|
||||
if (tei == Q921_TEI_GROUP || tei == link->tei) {
|
||||
q921_mdl_send(ctrl, Q921_TEI_IDENTITY_CHECK_RESPONSE, random() % 65535, link->tei, 1);
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_CHECK_RESPONSE, random() % 65535, link->tei, 1);
|
||||
}
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_REMOVE:
|
||||
if (NT_MODE(ctrl)) {
|
||||
/* We should not be receiving this message. */
|
||||
q921_mdl_ignore(ctrl, h, "We are the network.");
|
||||
return NULL;
|
||||
}
|
||||
if (!BRI_TE_PTMP(ctrl)) {
|
||||
/*
|
||||
* Silently ignore the message. If we are TE-PTP our
|
||||
* TEI is permanently assigned and cannot be removed.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* We're operating on the specific TEI link here */
|
||||
/* Assuming we're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
|
||||
if (link->state < Q921_TEI_ASSIGNED) {
|
||||
@@ -1950,9 +1911,7 @@ static void q921_mdl_remove(struct q921_link *link)
|
||||
|
||||
switch (link->state) {
|
||||
case Q921_TEI_ASSIGNED:
|
||||
if (mdl_free_me) {
|
||||
restart_timer_stop(link);
|
||||
}
|
||||
restart_timer_stop(link);
|
||||
/* XXX: deviation! Since we don't have a UI queue, we just discard our I-queue */
|
||||
q921_discard_iqueue(link);
|
||||
q921_setstate(link, Q921_TEI_UNASSIGNED);
|
||||
@@ -3028,32 +2987,27 @@ static pri_event *__q921_receive_qualified(struct q921_link *link, q921_h *h, in
|
||||
|
||||
static pri_event *q921_handle_unmatched_frame(struct pri *ctrl, q921_h *h, int len)
|
||||
{
|
||||
if (!BRI_NT_PTMP(ctrl)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (h->h.tei < Q921_TEI_AUTO_FIRST) {
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "Manual TEI range is not supported in NT-PTMP mode. Discarding\n");
|
||||
}
|
||||
if (h->h.tei < 64) {
|
||||
pri_error(ctrl, "Do not support manual TEI range. Discarding\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (h->h.sapi != Q921_SAPI_CALL_CTRL) {
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl, "Message with SAPI other than CALL CTRL is discarded\n");
|
||||
}
|
||||
pri_error(ctrl, "Message with SAPI other than CALL CTRL is discarded\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* This means an unrecognized TEI that we'll kill */
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl,
|
||||
"Could not find a layer 2 link for received frame with SAPI/TEI of %d/%d.\n",
|
||||
h->h.sapi, h->h.tei);
|
||||
pri_message(ctrl, "Sending TEI release, in order to re-establish TEI state\n");
|
||||
/* If we're NT-PTMP, this means an unrecognized TEI that we'll kill */
|
||||
if (BRI_NT_PTMP(ctrl)) {
|
||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
||||
pri_message(ctrl,
|
||||
"Could not find a layer 2 link for received frame with SAPI/TEI of %d/%d.\n",
|
||||
h->h.sapi, h->h.tei);
|
||||
pri_message(ctrl, "Sending TEI release, in order to re-establish TEI state\n");
|
||||
}
|
||||
|
||||
q921_tei_remove(ctrl, h->h.tei);
|
||||
}
|
||||
q921_tei_remove(ctrl, h->h.tei);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -3077,7 +3031,7 @@ static pri_event *__q921_receive(struct pri *ctrl, q921_h *h, int len)
|
||||
}
|
||||
|
||||
if (h->h.sapi == Q921_SAPI_LAYER2_MANAGEMENT) {
|
||||
return q921_mdl_receive(ctrl, &h->u, len);
|
||||
return q921_receive_MDL(ctrl, &h->u, len);
|
||||
}
|
||||
|
||||
if (h->h.tei == Q921_TEI_GROUP && h->h.sapi != Q921_SAPI_CALL_CTRL) {
|
||||
|
||||
Reference in New Issue
Block a user