Changes of Revision 26
[-] [+] | Changed | libpri.changes |
[-] [+] | Changed | libpri.spec ^ |
[-] [+] | Deleted | libpri.patch ^ |
@@ -1,63 +0,0 @@ ---- Makefile -+++ Makefile -@@ -48,6 +48,7 @@ - CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) $(LAYER2ALWAYSUP) $(FASTBUSYONBUSY) -DRELAX_TRB - INSTALL_PREFIX=$(DESTDIR) - INSTALL_BASE=/usr -+LIB=lib - SOFLAGS = -Wl,-hlibpri.so.1.0 - LDCONFIG = /sbin/ldconfig - ifneq (,$(findstring $(OSARCH), Linux GNU/kFreeBSD)) -@@ -88,28 +89,28 @@ - fi - - install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) -- mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -+ mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) - mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include - ifneq (${OSARCH},SunOS) - install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include -- install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -- if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi -- ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 ) -- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -- if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib; fi -+ install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) -+ if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB)/$(DYNAMIC_LIBRARY); fi -+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 ) -+ install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) -+ if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB); fi - else - install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h -- install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY) -- ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; $(SOSLINK) ) -- install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY) -+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) -m 755 $(DYNAMIC_LIBRARY) -+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) ; ln -sf libpri.so.1.0 libpri.so ; $(SOSLINK) ) -+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB) -m 644 $(STATIC_LIBRARY) - endif - - uninstall: - @echo "Removing Libpri" -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1.0 -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1 -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.a -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB)/libpri.so.1.0 -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB)/libpri.so.1 -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB)/libpri.so -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(LIB)/libpri.a - rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h - - pritest: pritest.o ---- q921.c -+++ q921.c -@@ -1558,7 +1558,7 @@ - /* Reset and restart t203 timer */ - if (pri->t203_timer[teio]) - pri_schedule_del(pri, pri->t203_timer[teio]); -- pri->t203_timer[teio] = pri_schedule_event2(pri, pri->timers[PRI_TIMER_T203], t203_expire, pri, tei); -+ pri->t203_timer[teio] = pri_schedule_event2(pri, pri->timers[PRI_TIMER_T203], t203_expire, pri, h->h.tei); - pri->solicitfbit[teio] = 0; - } - } else { | ||
[-] [+] | Deleted | libpri_makefile.diff ^ |
@@ -1,46 +0,0 @@ -Index: Makefile -=================================================================== ---- Makefile (revision 450) -+++ Makefile (working copy) -@@ -77,28 +77,28 @@ - fi - - install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) -- mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -+ mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) - mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include - ifneq (${OSARCH},SunOS) - install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include -- install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -- if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi -- ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 ) -- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -- if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib; fi -+ install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) -+ if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir)/$(DYNAMIC_LIBRARY); fi -+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 ) -+ install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) -+ if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir); fi - else - install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h -- install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY) -- ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; $(SOSLINK) ) -- install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY) -+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) -m 755 $(DYNAMIC_LIBRARY) -+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) ; ln -sf libpri.so.1.0 libpri.so ; $(SOSLINK) ) -+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir) -m 644 $(STATIC_LIBRARY) - endif - - uninstall: - @echo "Removing Libpri" -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1.0 -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1 -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so -- rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.a -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir)/libpri.so.1.0 -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir)/libpri.so.1 -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir)/libpri.so -+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/$(libdir)/libpri.a - rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h - - pritest: pritest.o | ||
[-] [+] | Deleted | libpri-1.4.12.tar.bz2/libpri-1.4.12-summary.html ^ |
@@ -1,325 +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"> -<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - libpri-1.4.12</title></head> -<body> -<h1 align="center"><a name="top">Release Summary</a></h1> -<h3 align="center">libpri-1.4.12</h3> -<h3 align="center">Date: 2011-07-05</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.11.</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> -77 rmudgett<br/> -1 alecdavis<br/> -1 dvossel<br/> -1 horape<br/> -1 jcollie<br/> -1 mattf<br/> -1 nic<br/> -1 paravoid<br/> -1 russell<br/> -1 tilghman<br/> -</td> -<td> -10 rmudgett<br/> -1 cmorford<br/> -1 ibercom<br/> -1 jcovert<br/> -1 jsmith<br/> -1 lelio<br/> -1 paravoid<br/> -1 patrol-cz<br/> -1 shawkris<br/> -1 wimpy<br/> -</td> -<td> -2 wuwu<br/> -1 alecdavis<br/> -1 bklang<br/> -1 cmorford<br/> -1 gelo<br/> -1 horape<br/> -1 ibercom<br/> -1 jcollie<br/> -1 jcovert<br/> -1 jims8650<br/> -1 jmls<br/> -1 jsmith<br/> -1 kenner<br/> -1 kobaz<br/> -1 lelio<br/> -1 nic_bellamy<br/> -1 paravoid<br/> -1 patrol-cz<br/> -1 schmoozecom<br/> -1 shawkris<br/> -1 tomaso<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: Channels/chan_dahdi</h3><br/> -<a href="https://issues.asterisk.org/jira/browse/ASTERISK-16038">ASTERISK-16038</a>: getting warning message every 4 seconds<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2113">2113</a><br/> -Reporter: jmls<br/> -Coders: rmudgett<br/> -<br/> -<h3>Category: Channels/chan_dahdi/NewFeature</h3><br/> -<a href="https://issues.asterisk.org/jira/browse/ASTERISK-13410">ASTERISK-13410</a>: [patch] CCBS/CCNR support for QSIG (libpri & chan_dahdi)<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1714">1714</a><br/> -Reporter: tomaso<br/> -Testers: rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<h3>Category: General</h3><br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-102">PRI-102</a>: [patch] [regression] Calling Number assignment logic change in libpri 1.4.11.<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1823">1823</a><br/> -Reporter: ibercom<br/> -Testers: ibercom<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-103">PRI-103</a>: segfault in pri_schedule_del - ctrl invalid value<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2015">2015</a><br/> -Reporter: wuwu<br/> -Testers: rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-105">PRI-105</a>: [patch] ISDN BRI does not recover from line faults<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1918">1918</a><br/> -Reporter: jcovert<br/> -Testers: jcovert, rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-107">PRI-107</a>: [patch] Calling name not successfully processed on inbound QSIG PRI calls from Mitel PBX<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1828">1828</a><br/> -Reporter: jims8650<br/> -Testers: rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-110">PRI-110</a>: [patch] BRI NT ptmp: Active channels not cleard when i/f goes down<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1982">1982</a><br/> -Reporter: wimpy<br/> -Testers: rmudgett, wimpy<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-112">PRI-112</a>: [patch] Libpri crashes when receiving Message Type (100)<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2021">2021</a><br/> -Reporter: gelo<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-113">PRI-113</a>: [patch] Asterisk is core dumping with LibPRI<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2015">2015</a><br/> -Reporter: schmoozecom<br/> -Testers: rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-114">PRI-114</a>: [patch] add extra IE Q931_IE_TIME_DATE to CONNECT message when in network mode<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2187">2187</a><br/> -Reporter: wuwu<br/> -Testers: rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-116">PRI-116</a>: [patch] B410P gets incoming call packets on ISDN but DAHDI doesn't generate the call in Asterisk<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2088">2088</a><br/> -Reporter: lelio<br/> -Testers: lelio<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-117">PRI-117</a>: SABME flood on backup D-channel in NFAS configuration<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2111">2111</a><br/> -Reporter: bklang<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-120">PRI-120</a>: [patch] Swap of master/slave in pri_enslave incorrect<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2192">2192</a><br/> -Reporter: jcollie<br/> -Coders: jcollie<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-121">PRI-121</a>: [patch] Caller ID Name always blank<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2206">2206</a><br/> -Reporter: cmorford<br/> -Testers: cmorford<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-62">PRI-62</a>: [patch] Inband disconnect setting does nothing<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1794">1794</a><br/> -Reporter: paravoid<br/> -Testers: paravoid<br/> -Coders: paravoid<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-81">PRI-81</a>: [patch] q921_rnr_rx Q921_TIMER_RECOVERY SDL issue<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1845">1845</a><br/> -Reporter: alecdavis<br/> -Coders: alecdavis<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-94">PRI-94</a>: [patch] pritest hadn't been ported to DAHDI<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1833">1833</a><br/> -Reporter: horape<br/> -Coders: horape<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-95">PRI-95</a>: [patch] LibPRI problem with restart of PBX processor (Testing SVN 1688)<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1962">1962</a><br/> -Reporter: shawkris<br/> -Testers: shawkris, rmudgett<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-98">PRI-98</a>: [patch] Regression in libpri 1.4.11 - handling ROSE<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1785">1785</a><br/> -Reporter: patrol-cz<br/> -Testers: rmudgett, patrol-cz<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-99">PRI-99</a>: [patch] CallerID name not transmitted on versions of LibPRI after 1.4.10.2<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1810">1810</a><br/> -Reporter: jsmith<br/> -Testers: rmudgett, jsmith<br/> -Coders: rmudgett<br/> -<br/> -<h3>Category: NewFeature</h3><br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-122">PRI-122</a>: Option needed for IE_TIME_DATE to be optional on connect<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2266">2266</a><br/> -Reporter: kenner<br/> -Coders: rmudgett<br/> -<br/> -<a href="https://issues.asterisk.org/jira/browse/PRI-54">PRI-54</a>: [patch] Add pri_new_bri_cb() API - Create BRI D-channel with user defined I/O callbacks and data<br/> -Revision: <a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1836">1836</a><br/> -Reporter: nic_bellamy<br/> -Coders: nic<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=1723">1723</a></td><td>rmudgett</td><td>Added ETSI Explicit Call Transfer (ECT) support.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1737">1737</a></td><td>rmudgett</td><td>ETSI Advice Of Charge (AOC) event reporting.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1746">1746</a></td><td>rmudgett</td><td>ETSI Call Waiting support.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1757">1757</a></td><td>rmudgett</td><td>ETSI Malicious Call ID support.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1767">1767</a></td><td>rmudgett</td><td>ETSI Message Waiting Indication (MWI) support.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1776">1776</a></td><td>dvossel</td><td>support for sending ETSI advice of charge</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1829">1829</a></td><td>rmudgett</td><td>Added a libpri version output line as a sanity check for rosetest.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1830">1830</a></td><td>rmudgett</td><td>Only need to output one version of the version message.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1842">1842</a></td><td>rmudgett</td><td>Renamed local struct pri *pri variables to struct pri *ctrl in q921.c.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1848">1848</a></td><td>rmudgett</td><td>Improved Q.921/Q.931 debug output.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1852">1852</a></td><td>rmudgett</td><td>Learn (AGAIN!) why state 7 and state 8 transitions were suppressed.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1853">1853</a></td><td>rmudgett</td><td>No audio on inbound J1 calls.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-35">PRI-35</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1878">1878</a></td><td>mattf</td><td>Add silly fake MDL error Z for kicking L2 to reactivate if a DISC or DM is received in proper states on PTP links.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1883">1883</a></td><td>rmudgett</td><td>Don't silently fail to post our fake MDL-ERROR(Z).</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1884">1884</a></td><td>rmudgett</td><td>Added gripe check to rosetest for invalid operation and error codes.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1894">1894</a></td><td>rmudgett</td><td>Make pri_dump_event() only print the event name.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1904">1904</a></td><td>rmudgett</td><td>Add support to receive ECMA-164 2nd edition OID name ROSE messages.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-37">PRI-37</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1912">1912</a></td><td>rmudgett</td><td>Convert most references of Q931_MAX_TEI to use ARRAY_LEN().</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1923">1923</a></td><td>rmudgett</td><td>Q.921 improvements from comparing Q.921 SDL diagrams with implementation.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1928">1928</a></td><td>rmudgett</td><td>Q.921/Q.931 message debug output improvements.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1929">1929</a></td><td>rmudgett</td><td>Reduced fake MDL-ERROR (Z) message severity to be visible only when debugging enabled.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1955">1955</a></td><td>rmudgett</td><td>Don't crash in __pri_new_tei() if a GR303 subchannel creation fails.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1958">1958</a></td><td>rmudgett</td><td>Balance curly braces in post_handle_q931_message().</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1961">1961</a></td><td>rmudgett</td><td>Prevent a CONNECT message from sending a CONNECT ACKNOWLEDGE in the wrong state.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-95">PRI-95</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1965">1965</a></td><td>rmudgett</td><td>Added more parameter checks to pri_set_timer() and pri_get_timer().</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1976">1976</a></td><td>rmudgett</td><td>Fix spelling error in PTMP agent FSM files.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=1991">1991</a></td><td>rmudgett</td><td>PRI links do not retain active calls if the link comes back before T309 expires.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2001">2001</a></td><td>russell</td><td>Makefile tweaks to allow building for code coverage analysis.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2009">2009</a></td><td>tilghman</td><td>Minor changes to make libpri build on Mac OS X</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2027">2027</a></td><td>rmudgett</td><td>Create two versions of call ptr verify. One gripes and one does not.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2042">2042</a></td><td>rmudgett</td><td>Dump Q.931 message using the TEI value the message came in with.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2063">2063</a></td><td>rmudgett</td><td>Logically separate Q.921 TEI link processing from D channel control.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2070">2070</a></td><td>rmudgett</td><td>Restructure the Q.931 call record to layer 2 link association.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2077">2077</a></td><td>rmudgett</td><td>Extract the layer 2 link structure out of struct pri.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2078">2078</a></td><td>rmudgett</td><td>Partial support for dynamic interfaces with NFAS.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2079">2079</a></td><td>rmudgett</td><td>Fixes CC agents not automatically clearing if T309 clears the original call.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-46">PRI-46</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2098">2098</a></td><td>rmudgett</td><td>Mainly put space after switch and while keywords.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2101">2101</a></td><td>rmudgett</td><td>Remove all TEIs when NT PTMP starts.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-51">PRI-51</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2102">2102</a></td><td>rmudgett</td><td>Remove unneeded struct q921_link.mdl_error_state member.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2103">2103</a></td><td>rmudgett</td><td>Convert TEI identity defines to enum and create 2str() function.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2104">2104</a></td><td>rmudgett</td><td>Q.921 TEI assignment procedure corrections.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2105">2105</a></td><td>rmudgett</td><td>Added TEI identity check feature to reclaim dead TEIs.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-51">PRI-51</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2109">2109</a></td><td>rmudgett</td><td>Minor MDL handler changes.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2166">2166</a></td><td>rmudgett</td><td>Fix bizarre logic to work as originally intended in q931_notify().</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2167">2167</a></td><td>rmudgett</td><td>Return error if q931_notify() cannot send NOTIFY.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2169">2169</a></td><td>rmudgett</td><td>Fix regression when reorganized for struct pri and struct q921_link.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2170">2170</a></td><td>rmudgett</td><td>Better HOLD/RETRIEVE collision handling.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2172">2172</a></td><td>rmudgett</td><td>Add call transfer exchange of subaddresses support and fix PTMP call transfer signaling.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-47">PRI-47</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2174">2174</a></td><td>rmudgett</td><td>Fix Q.931 retried SETUP not sending facility ies.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2175">2175</a></td><td>rmudgett</td><td>Invalid PTMP redirecting signaling as TE towards NT.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-53">PRI-53</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2183">2183</a></td><td>rmudgett</td><td>Enable LIBPRI_COUNTERS code by default.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-61">PRI-61</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2190">2190</a></td><td>rmudgett</td><td>Add display ie text handling options.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2200">2200</a></td><td>rmudgett</td><td>Fix I-frame retransmission quirks.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-60">PRI-60</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2202">2202</a></td><td>rmudgett</td><td>Crash if NFAS swaps D channels on a call with an active timer.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-58">PRI-58</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2204">2204</a></td><td>rmudgett</td><td>* Added switchtype to ROSE invoke operation not handled message.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2207">2207</a></td><td>rmudgett</td><td>B channel lost by incoming call in BRI NT PTMP mode.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2227">2227</a></td><td>rmudgett</td><td>Add determined remote node type to pri_dump_info_str().</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2232">2232</a></td><td>rmudgett</td><td>Improve the usefulness of pri_dump_info_str() output.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2233">2233</a></td><td>rmudgett</td><td>Fix valgrind reported invalid read/write for display text feature.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2236">2236</a></td><td>rmudgett</td><td>Miscellaneous cleanup before T312 branch merge.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2238">2238</a></td><td>rmudgett</td><td>Implement the mandatory T312 timer for NT PTMP broadcast SETUP calls.</td> -<td><a href="https://issues.asterisk.org/jira/browse/PRI-32">PRI-32</a></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2258">2258</a></td><td>rmudgett</td><td>CallRerouting response not sent if peer hangs up first.</td> -<td></td></tr><tr><td><a href="http://svn.digium.com/view/libpri/branches/1.4?view=revision&revision=2262">2262</a></td><td>rmudgett</td><td>Problems with ISDN MWI to phones.</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 | 39 -doc/cc_ptmp_agent.fsm | 376 + -doc/cc_ptmp_agent_flattened.fsm | 494 ++ -doc/cc_ptmp_monitor.fsm | 181 -doc/cc_ptmp_monitor_flattened.fsm | 225 + -doc/cc_ptp_agent.fsm | 152 -doc/cc_ptp_agent_flattened.fsm | 200 -doc/cc_ptp_monitor.fsm | 168 -doc/cc_ptp_monitor_flattened.fsm | 217 + -doc/cc_qsig_agent.fsm | 140 -doc/cc_qsig_agent_flattened.fsm | 187 -doc/cc_qsig_monitor.fsm | 249 + -doc/cc_qsig_monitor_flattened.fsm | 327 + -libpri.h | 900 ++++ -pri.c | 1151 ++++- -pri_aoc.c | 1764 ++++++++ -pri_cc.c | 7884 ++++++++++++++++++++++++++++++++++++++ -pri_facility.c | 1823 +++++++- -pri_facility.h | 87 -pri_internal.h | 593 ++ -pri_q921.h | 115 -pri_q931.h | 27 -prisched.c | 228 - -pritest.c | 83 -q921.c | 2942 +++++++++----- -q931.c | 3388 ++++++++++++---- -rose.c | 536 ++ -rose.h | 856 ++++ -rose_etsi_aoc.c | 9 -rose_etsi_cc.c | 1853 ++++++++ -rose_etsi_mwi.c | 686 +++ -rose_internal.h | 205 -rose_qsig_cc.c | 984 ++++ -rose_qsig_mwi.c | 9 -rose_qsig_name.c | 1 -rosetest.c | 919 ++++ -36 files changed, 27493 insertions(+), 2505 deletions(-) -</pre><br/> -<hr/> -</body> -</html> | ||
[-] [+] | Deleted | libpri-1.4.12.tar.bz2/libpri-1.4.12-summary.txt ^ |
@@ -1,483 +0,0 @@ - Release Summary - - libpri-1.4.12 - - Date: 2011-07-05 - - <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.11. - - ---------------------------------------------------------------------- - - 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 - 77 rmudgett 10 rmudgett 2 wuwu - 1 alecdavis 1 cmorford 1 alecdavis - 1 dvossel 1 ibercom 1 bklang - 1 horape 1 jcovert 1 cmorford - 1 jcollie 1 jsmith 1 gelo - 1 mattf 1 lelio 1 horape - 1 nic 1 paravoid 1 ibercom - 1 paravoid 1 patrol-cz 1 jcollie - 1 russell 1 shawkris 1 jcovert - 1 tilghman 1 wimpy 1 jims8650 - 1 jmls - 1 jsmith - 1 kenner - 1 kobaz - 1 lelio - 1 nic_bellamy - 1 paravoid - 1 patrol-cz - 1 schmoozecom - 1 shawkris - 1 tomaso - 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: Channels/chan_dahdi - - ASTERISK-16038: getting warning message every 4 seconds - Revision: 2113 - Reporter: jmls - Coders: rmudgett - - Category: Channels/chan_dahdi/NewFeature - - ASTERISK-13410: [patch] CCBS/CCNR support for QSIG (libpri & chan_dahdi) - Revision: 1714 - Reporter: tomaso - Testers: rmudgett - Coders: rmudgett - - Category: General - - PRI-102: [patch] [regression] Calling Number assignment logic change in - libpri 1.4.11. - Revision: 1823 - Reporter: ibercom - Testers: ibercom - Coders: rmudgett - - PRI-103: segfault in pri_schedule_del - ctrl invalid value - Revision: 2015 - Reporter: wuwu - Testers: rmudgett - Coders: rmudgett - - PRI-105: [patch] ISDN BRI does not recover from line faults - Revision: 1918 - Reporter: jcovert - Testers: jcovert, rmudgett - Coders: rmudgett - - PRI-107: [patch] Calling name not successfully processed on inbound QSIG - PRI calls from Mitel PBX - Revision: 1828 - Reporter: jims8650 - Testers: rmudgett - Coders: rmudgett - - PRI-110: [patch] BRI NT ptmp: Active channels not cleard when i/f goes - down - Revision: 1982 - Reporter: wimpy - Testers: rmudgett, wimpy - Coders: rmudgett - - PRI-112: [patch] Libpri crashes when receiving Message Type (100) - Revision: 2021 - Reporter: gelo - Coders: rmudgett - - PRI-113: [patch] Asterisk is core dumping with LibPRI - Revision: 2015 - Reporter: schmoozecom - Testers: rmudgett - Coders: rmudgett - - PRI-114: [patch] add extra IE Q931_IE_TIME_DATE to CONNECT message when in - network mode - Revision: 2187 - Reporter: wuwu - Testers: rmudgett - Coders: rmudgett - - PRI-116: [patch] B410P gets incoming call packets on ISDN but DAHDI - doesn't generate the call in Asterisk - Revision: 2088 - Reporter: lelio - Testers: lelio - Coders: rmudgett - - PRI-117: SABME flood on backup D-channel in NFAS configuration - Revision: 2111 - Reporter: bklang - Coders: rmudgett - - PRI-120: [patch] Swap of master/slave in pri_enslave incorrect - Revision: 2192 - Reporter: jcollie - Coders: jcollie - - PRI-121: [patch] Caller ID Name always blank - Revision: 2206 - Reporter: cmorford - Testers: cmorford - Coders: rmudgett - - PRI-62: [patch] Inband disconnect setting does nothing - Revision: 1794 - Reporter: paravoid - Testers: paravoid - Coders: paravoid - - PRI-81: [patch] q921_rnr_rx Q921_TIMER_RECOVERY SDL issue - Revision: 1845 - Reporter: alecdavis - Coders: alecdavis - - PRI-94: [patch] pritest hadn't been ported to DAHDI - Revision: 1833 - Reporter: horape - Coders: horape - - PRI-95: [patch] LibPRI problem with restart of PBX processor (Testing SVN - 1688) - Revision: 1962 - Reporter: shawkris - Testers: shawkris, rmudgett - Coders: rmudgett - - PRI-98: [patch] Regression in libpri 1.4.11 - handling ROSE - Revision: 1785 - Reporter: patrol-cz - Testers: rmudgett, patrol-cz - Coders: rmudgett - - PRI-99: [patch] CallerID name not transmitted on versions of LibPRI after - 1.4.10.2 - Revision: 1810 - Reporter: jsmith - Testers: rmudgett, jsmith - Coders: rmudgett - - Category: NewFeature - - PRI-122: Option needed for IE_TIME_DATE to be optional on connect - Revision: 2266 - Reporter: kenner - Coders: rmudgett - - PRI-54: [patch] Add pri_new_bri_cb() API - Create BRI D-channel with user - defined I/O callbacks and data - Revision: 1836 - Reporter: nic_bellamy - Coders: nic - - ---------------------------------------------------------------------- - - 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 | - |----------+----------+-------------------------------------+------------| - | 1723 | rmudgett | Added ETSI Explicit Call Transfer | | - | | | (ECT) support. | | - |----------+----------+-------------------------------------+------------| - | 1737 | rmudgett | ETSI Advice Of Charge (AOC) event | | - | | | reporting. | | - |----------+----------+-------------------------------------+------------| - | 1746 | rmudgett | ETSI Call Waiting support. | | - |----------+----------+-------------------------------------+------------| - | 1757 | rmudgett | ETSI Malicious Call ID support. | | - |----------+----------+-------------------------------------+------------| - | 1767 | rmudgett | ETSI Message Waiting Indication | | - | | | (MWI) support. | | - |----------+----------+-------------------------------------+------------| - | 1776 | dvossel | support for sending ETSI advice of | | - | | | charge | | - |----------+----------+-------------------------------------+------------| - | 1829 | rmudgett | Added a libpri version output line | | - | | | as a sanity check for rosetest. | | - |----------+----------+-------------------------------------+------------| - | 1830 | rmudgett | Only need to output one version of | | - | | | the version message. | | - |----------+----------+-------------------------------------+------------| - | | | Renamed local struct pri *pri | | - | 1842 | rmudgett | variables to struct pri *ctrl in | | - | | | q921.c. | | - |----------+----------+-------------------------------------+------------| - | 1848 | rmudgett | Improved Q.921/Q.931 debug output. | | - |----------+----------+-------------------------------------+------------| - | | | Learn (AGAIN!) why state 7 and | | - | 1852 | rmudgett | state 8 transitions were | | - | | | suppressed. | | - |----------+----------+-------------------------------------+------------| - | 1853 | rmudgett | No audio on inbound J1 calls. | PRI-35 | - |----------+----------+-------------------------------------+------------| - | | | Add silly fake MDL error Z for | | - | 1878 | mattf | kicking L2 to reactivate if a DISC | | - | | | or DM is received in proper states | | - | | | on PTP links. | | - |----------+----------+-------------------------------------+------------| - | 1883 | rmudgett | Don't silently fail to post our | | - | | | fake MDL-ERROR(Z). | | - |----------+----------+-------------------------------------+------------| - | 1884 | rmudgett | Added gripe check to rosetest for | | - | | | invalid operation and error codes. | | - |----------+----------+-------------------------------------+------------| - | 1894 | rmudgett | Make pri_dump_event() only print | | - | | | the event name. | | - |----------+----------+-------------------------------------+------------| - | 1904 | rmudgett | Add support to receive ECMA-164 2nd | PRI-37 | - | | | edition OID name ROSE messages. | | - |----------+----------+-------------------------------------+------------| - | 1912 | rmudgett | Convert most references of | | - | | | Q931_MAX_TEI to use ARRAY_LEN(). | | - |----------+----------+-------------------------------------+------------| - | | | Q.921 improvements from comparing | | - | 1923 | rmudgett | Q.921 SDL diagrams with | | - | | | implementation. | | - |----------+----------+-------------------------------------+------------| - | 1928 | rmudgett | Q.921/Q.931 message debug output | | - | | | improvements. | | - |----------+----------+-------------------------------------+------------| - | | | Reduced fake MDL-ERROR (Z) message | | - | 1929 | rmudgett | severity to be visible only when | | - | | | debugging enabled. | | - |----------+----------+-------------------------------------+------------| - | 1955 | rmudgett | Don't crash in __pri_new_tei() if a | | - | | | GR303 subchannel creation fails. | | - |----------+----------+-------------------------------------+------------| - | 1958 | rmudgett | Balance curly braces in | | - | | | post_handle_q931_message(). | | - |----------+----------+-------------------------------------+------------| - | | | Prevent a CONNECT message from | | - | 1961 | rmudgett | sending a CONNECT ACKNOWLEDGE in | PRI-95 | - | | | the wrong state. | | - |----------+----------+-------------------------------------+------------| - | | | Added more parameter checks to | | - | 1965 | rmudgett | pri_set_timer() and | | - | | | pri_get_timer(). | | - |----------+----------+-------------------------------------+------------| - | 1976 | rmudgett | Fix spelling error in PTMP agent | | - | | | FSM files. | | - |----------+----------+-------------------------------------+------------| - | | | PRI links do not retain active | | - | 1991 | rmudgett | calls if the link comes back before | | - | | | T309 expires. | | - |----------+----------+-------------------------------------+------------| - | 2001 | russell | Makefile tweaks to allow building | | - | | | for code coverage analysis. | | - |----------+----------+-------------------------------------+------------| - | 2009 | tilghman | Minor changes to make libpri build | | - | | | on Mac OS X | | - |----------+----------+-------------------------------------+------------| - | | | Create two versions of call ptr | | - | 2027 | rmudgett | verify. One gripes and one does | | - | | | not. | | - |----------+----------+-------------------------------------+------------| - | 2042 | rmudgett | Dump Q.931 message using the TEI | | - | | | value the message came in with. | | - |----------+----------+-------------------------------------+------------| - | 2063 | rmudgett | Logically separate Q.921 TEI link | | - | | | processing from D channel control. | | - |----------+----------+-------------------------------------+------------| - | 2070 | rmudgett | Restructure the Q.931 call record | | - | | | to layer 2 link association. | | - |----------+----------+-------------------------------------+------------| - | 2077 | rmudgett | Extract the layer 2 link structure | | - | | | out of struct pri. | | - |----------+----------+-------------------------------------+------------| - | 2078 | rmudgett | Partial support for dynamic | | - | | | interfaces with NFAS. | | - |----------+----------+-------------------------------------+------------| - | | | Fixes CC agents not automatically | | - | 2079 | rmudgett | clearing if T309 clears the | PRI-46 | - | | | original call. | | - |----------+----------+-------------------------------------+------------| - | 2098 | rmudgett | Mainly put space after switch and | | - | | | while keywords. | | - |----------+----------+-------------------------------------+------------| - | 2101 | rmudgett | Remove all TEIs when NT PTMP | PRI-51 | - | | | starts. | | - |----------+----------+-------------------------------------+------------| - | 2102 | rmudgett | Remove unneeded struct | | - | | | q921_link.mdl_error_state member. | | - |----------+----------+-------------------------------------+------------| - | 2103 | rmudgett | Convert TEI identity defines to | | - | | | enum and create 2str() function. | | - |----------+----------+-------------------------------------+------------| - | 2104 | rmudgett | Q.921 TEI assignment procedure | | - | | | corrections. | | - |----------+----------+-------------------------------------+------------| - | 2105 | rmudgett | Added TEI identity check feature to | PRI-51 | - | | | reclaim dead TEIs. | | - |----------+----------+-------------------------------------+------------| - | 2109 | rmudgett | Minor MDL handler changes. | | - |----------+----------+-------------------------------------+------------| - | | | Fix bizarre logic to work as | | - | 2166 | rmudgett | originally intended in | | - | | | q931_notify(). | | - |----------+----------+-------------------------------------+------------| - | 2167 | rmudgett | Return error if q931_notify() | | - | | | cannot send NOTIFY. | | - |----------+----------+-------------------------------------+------------| - | 2169 | rmudgett | Fix regression when reorganized for | | - | | | struct pri and struct q921_link. | | - |----------+----------+-------------------------------------+------------| - | 2170 | rmudgett | Better HOLD/RETRIEVE collision | | - | | | handling. | | - |----------+----------+-------------------------------------+------------| - | | | Add call transfer exchange of | | - | 2172 | rmudgett | subaddresses support and fix PTMP | PRI-47 | - | | | call transfer signaling. | | - |----------+----------+-------------------------------------+------------| - | 2174 | rmudgett | Fix Q.931 retried SETUP not sending | | - | | | facility ies. | | - |----------+----------+-------------------------------------+------------| - | 2175 | rmudgett | Invalid PTMP redirecting signaling | PRI-53 | - | | | as TE towards NT. | | - |----------+----------+-------------------------------------+------------| - | 2183 | rmudgett | Enable LIBPRI_COUNTERS code by | PRI-61 | - | | | default. | | - |----------+----------+-------------------------------------+------------| - | 2190 | rmudgett | Add display ie text handling | | - | | | options. | | - |----------+----------+-------------------------------------+------------| - | 2200 | rmudgett | Fix I-frame retransmission quirks. | PRI-60 | - |----------+----------+-------------------------------------+------------| - | 2202 | rmudgett | Crash if NFAS swaps D channels on a | PRI-58 | - | | | call with an active timer. | | - |----------+----------+-------------------------------------+------------| - | 2204 | rmudgett | * Added switchtype to ROSE invoke | | - | | | operation not handled message. | | - |----------+----------+-------------------------------------+------------| - | 2207 | rmudgett | B channel lost by incoming call in | | - | | | BRI NT PTMP mode. | | - |----------+----------+-------------------------------------+------------| - | 2227 | rmudgett | Add determined remote node type to | | - | | | pri_dump_info_str(). | | - |----------+----------+-------------------------------------+------------| - | 2232 | rmudgett | Improve the usefulness of | | - | | | pri_dump_info_str() output. | | - |----------+----------+-------------------------------------+------------| - | | | Fix valgrind reported invalid | | - | 2233 | rmudgett | read/write for display text | | - | | | feature. | | - |----------+----------+-------------------------------------+------------| - | 2236 | rmudgett | Miscellaneous cleanup before T312 | | - | | | branch merge. | | - |----------+----------+-------------------------------------+------------| - | 2238 | rmudgett | Implement the mandatory T312 timer | PRI-32 | - | | | for NT PTMP broadcast SETUP calls. | | - |----------+----------+-------------------------------------+------------| - | 2258 | rmudgett | CallRerouting response not sent if | | - | | | peer hangs up first. | | - |----------+----------+-------------------------------------+------------| - | 2262 | rmudgett | Problems with ISDN MWI to phones. | | - +------------------------------------------------------------------------+ - - ---------------------------------------------------------------------- - - 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 | 39 - doc/cc_ptmp_agent.fsm | 376 + - doc/cc_ptmp_agent_flattened.fsm | 494 ++ - doc/cc_ptmp_monitor.fsm | 181 - doc/cc_ptmp_monitor_flattened.fsm | 225 + - doc/cc_ptp_agent.fsm | 152 - doc/cc_ptp_agent_flattened.fsm | 200 - doc/cc_ptp_monitor.fsm | 168 - doc/cc_ptp_monitor_flattened.fsm | 217 + - doc/cc_qsig_agent.fsm | 140 - doc/cc_qsig_agent_flattened.fsm | 187 - doc/cc_qsig_monitor.fsm | 249 + - doc/cc_qsig_monitor_flattened.fsm | 327 + - libpri.h | 900 ++++ - pri.c | 1151 ++++- - pri_aoc.c | 1764 ++++++++ - pri_cc.c | 7884 ++++++++++++++++++++++++++++++++++++++ - pri_facility.c | 1823 +++++++- - pri_facility.h | 87 - pri_internal.h | 593 ++ - pri_q921.h | 115 - pri_q931.h | 27 - prisched.c | 228 - - pritest.c | 83 - q921.c | 2942 +++++++++----- - q931.c | 3388 ++++++++++++---- - rose.c | 536 ++ - rose.h | 856 ++++ - rose_etsi_aoc.c | 9 - rose_etsi_cc.c | 1853 ++++++++ - rose_etsi_mwi.c | 686 +++ - rose_internal.h | 205 - rose_qsig_cc.c | 984 ++++ - rose_qsig_mwi.c | 9 - rose_qsig_name.c | 1 - rosetest.c | 919 ++++ - 36 files changed, 27493 insertions(+), 2505 deletions(-) - - ---------------------------------------------------------------------- | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/.version ^ |
@@ -1 +1 @@ -1.4.12 +1.4.13 | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/ChangeLog ^ |
@@ -1,3 +1,165 @@ +2012-10-09 Asterisk Development Team <asteriskteam@digium.com> + + * libpri 1.4.13 Released. + +2012-09-26 15:46 +0000 [r2300] Richard Mudgett <rmudgett@digium.com> + + * Makefile: Allow passing compiler flags (CFLAGS, LDFLAGS) (closes + issue PRI-144) Reported by: Tzafrir Cohen Patches: flags.diff + (license #5035) patch uploaded by Tzafrir Cohen + +2012-09-10 15:52 +0000 [r2298] Richard Mudgett <rmudgett@digium.com> + + * pridump.c: Fix compile error in pridump.c. With gcc 4.6.3 it's + possible to get the following error: $ make gcc -Wall -Werror + -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -O2 -MD -MT + pridump.o -MF .pridump.o.d -MP -c -o pridump.o pridump.c + pridump.c: In function \u2018pri_bridge\u2019: pridump.c:117:1: + error: no return statement in function returning non-void + [-Werror=return-type] cc1: all warnings being treated as errors + make: *** [pridump.o] Error 1 Changing the function return value + to void fixes the issue since there were no places in the code + that used the return value. (closes issue PRI-143) Reported by: + Birger "WIMPy" Harzenetter Patches: + 0001-Fix-no-return-statement-in-function-returning-non-vo.patch + (license #5417) patch uploaded by Shaun Ruffell + +2012-08-11 01:38 +0000 [r2292-2295] Richard Mudgett <rmudgett@digium.com> + + * /: SVN ignore built utilities. + + * Makefile: * Made no longer compile *.lo files they are identical + to *.o files. * Made compile the pritest, rosetest, and + testprilib utilities using the static libpri library. No more + forgetting to install the library after a change and wondering + why it still did not work. The pridump utility is still + dynamically linked. * Made compile the utilities by default. + + * pridump.c, testprilib.c: Make pridump and testprilib compile + again. + +2012-07-30 16:20 +0000 [r2290] Richard Mudgett <rmudgett@digium.com> + + * q921.c: Removed MDL/TEI management configuration warning message. + Some telco switches send out MDL messages even though they are + configured for PTP. Usually they are checking for assigned TEI's. + Since these switches periodically poll for assigned TEI's, the + message needlessly fills up log files. * Changed message warning + level to a normal debug message level and reworded. (closes issue + PRI-137) Reported by: Bart Coninckx + +2012-06-28 00:16 +0000 [r2288] Richard Mudgett <rmudgett@digium.com> + + * pri.c, pri_internal.h, q931.c, libpri.h: Implement T316 to allow + RESTART messages to be automatically retransmitted. Q.931 defines + the T316 timer to retransmit RESTART messages if a RESTART + ACKNOWLEDGE message is not received before the timer expires. + Q.931 defaults the time of T316 to 2 minutes with the default + number of consecutive RESTART failures as two. * To support + legacy behavior, the T316 timer is disabled by default. It is + also disabled because the user cannot configure it to disabled if + it is enabled. * The N316 count is created to allow the number of + RESTART attempts to be configurable. Note you will need to + recompile Asterisk to be able to configure N316. (issue + ASTERISK-19608) (issue AST-815) (closes issue PRI-133) Reported + by: Mike Boylan Tested by: rmudgett + +2012-05-14 14:54 +0000 [r2286] Richard Mudgett <rmudgett@digium.com> + + * q931.c: Make pri_pres2str() return correct string. * Fix + pri_pres2str() mask creation. (closes issue PRI-139) Reported by: + Pavel Troller Patches: q931.c.diff (license #6302) patch uploaded + by Pavel Troller + +2012-03-23 19:35 +0000 [r2284] Richard Mudgett <rmudgett@digium.com> + + * pri.c, q931.c, pri_facility.c, pri_cc.c: Make number not + available presentation also set screening to network provided. + Q.951 indicates that when the presentation indicator is "Number + not available due to interworking" for a number then the + screening indicator field should be "Network provided". Released + versions of Asterisk starting with v1.8 relesed before this patch + only recognized the PRES_NUMBER_NOT_AVAILABLE value as an + unavailable number. This patch improves compatibility as a + result. * Made mask the presentation value for names and numbers + from the upper layer. * Made pri_mwi_indicate_v2() also call + q931_party_id_fixup() for completeness even though it is a noop + in this case. * Made pri_pres2str() deceoode better. + +2012-02-03 23:12 +0000 [r2282] Kinsey Moore <kmoore@digium.com> + + * pri_q921.h, q921.c, pridump.c: Make PRI_DEBUG_Q921_RAW work + independantly of PRI_DEBUG_Q921_DUMP Ensure that the DUMP and RAW + flags work independently in q921_dump(). (closes issue PRI-119) + Patch-by: wimpy + +2012-01-26 20:19 +0000 [r2280] Richard Mudgett <rmudgett@digium.com> + + * q931.c: Use ie2str(full_ie) where possible in q931.c. Initial + patch by Alec Davis. Review: + https://reviewboard.asterisk.org/r/1633/ + +2011-12-16 20:01 +0000 [r2277-2278] Richard Mudgett <rmudgett@digium.com> + + * pri_internal.h, q931.c: Remove nul octets from IE data that is + normally treated as strings. Sometimes ie values received from + carriers contain nul octets in values normally treated by libpri + as nul terminated strings. A discussion on the asterisk-users + list determined that the best thing to do in the situation is to + delete the nul octets and unconditionally report/log when that + happens. * Remove nul octets from the following ie's and generate + an unconditional log message to the upper layer when they are + removed: Connected Number Connected Address Redirecting Number + Original Called Number Redirection Number Called Party Number + Calling Party Number Display Keypad Facility (closes issue + PRI-128) Reported by: phsultan Patches: jira_pri_128.patch + (license #5621) patch uploaded by rmudgett (modified) Tested by: + rmudgett + + * pri_internal.h, q931.c: Implement handling a multi-channel + RESTART request. The channel id ie can supply a slotmap or list + of channels. For a RESTART message, this can be handy to indicate + multiple channels that need to be restarted at the same time. An + incoming RESTART request will now generate a PRI_EVENT_RESTART to + the upper layer for each channel indicated in the request. If the + event is successfully generated for all indicated channels then a + RESTART_ACKNOWLEDGE is sent back to the peer indicating all + channels restarted. * Add the ability to process a channel id ie + channel list with a RESTART request. * Add the ability to process + slotmaps with a RESTART request. (closes issue PRI-93) Reported + by: Marcin Kowalczyk Patches: jira_pri_93.patch (license #5621) + patch uploaded by rmudgett Tested by: zvision, rmudgett (closes + issue PRI-71) Reported by: Torrey Searle Tested by: rmudgett + +2011-09-26 22:54 +0000 [r2275] Richard Mudgett <rmudgett@digium.com> + + * q931.c: Fix message typo: Weird (closes issue PRI-126) Reported + by: Tzafrir Cohen + +2011-08-17 15:48 +0000 [r2273] Richard Mudgett <rmudgett@digium.com> + + * pri.c, pri_internal.h, pri_q921.h, q921.c, libpri.h: Outgoing BRI + calls fail when using Asterisk 1.8 with HA8, HB8, and B410P + cards. France Telecom brings layer 2 and layer 1 down on BRI + lines when the line is idle. When layer 1 goes down Asterisk + cannot make outgoing calls and the HA8 and HB8 cards also get IRQ + misses. The inability to make outgoing calls is because the line + is in red alarm and Asterisk will not make calls over a line it + considers unavailable. The IRQ misses for the HA8 and HB8 card + are because the hardware is switching clock sources from the line + which just brought layer 1 down to internal timing. There is a + DAHDI option for the B410P card to not tell Asterisk that layer 1 + went down so Asterisk will allow outgoing calls: "modprobe + wcb4xxp teignored=1". There is a similar DAHDI option for the HA8 + and HB8 cards: "modprobe wctdm24xxp bri_teignored=1". + Unfortunately that will not clear up the IRQ misses when the + telco brings layer 1 down. * Add layer 2 persistence option to + customize the layer 2 behavior on BRI PTMP lines. The new option + has three settings: 1) Use libpri default layer 2 setting. 2) + Keep layer 2 up. Bring layer 2 back up when the peer brings it + down. 3) Leave layer 2 down when the peer brings it down. Layer 2 + will be brought up as needed for outgoing calls. JIRA AST-598 + 2011-07-05 Leif Madsen <lmadsen@digium.com> * Release libpri 1.4.12 | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/Makefile ^ |
@@ -10,15 +10,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # # Uncomment if you want libpri not send PROGRESS_INDICATOR w/ALERTING @@ -65,43 +65,21 @@ rose_qsig_name.o \ version.o DYNAMIC_OBJS= \ - copy_string.lo \ - pri.lo \ - q921.lo \ - prisched.lo \ - q931.lo \ - pri_aoc.lo \ - pri_cc.lo \ - pri_facility.lo \ - asn1_primitive.lo \ - rose.lo \ - rose_address.lo \ - rose_etsi_aoc.lo \ - rose_etsi_cc.lo \ - rose_etsi_diversion.lo \ - rose_etsi_ect.lo \ - rose_etsi_mwi.lo \ - rose_other.lo \ - rose_q931.lo \ - rose_qsig_aoc.lo \ - rose_qsig_cc.lo \ - rose_qsig_ct.lo \ - rose_qsig_diversion.lo \ - rose_qsig_mwi.lo \ - rose_qsig_name.lo \ - version.lo -CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS) + $(STATIC_OBJS) +CFLAGS ?= -g +CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes +CFLAGS += -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS) INSTALL_PREFIX=$(DESTDIR) INSTALL_BASE=/usr libdir?=$(INSTALL_BASE)/lib ifneq ($(findstring Darwin,$(OSARCH)),) - SOFLAGS=-dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace + SOFLAGS=$(LDFLAGS) -dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6) SOFLAGS+=/usr/lib/bundle1.o endif LDCONFIG=/usr/bin/true else - SOFLAGS=-shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS) + SOFLAGS=$(LDFLAGS) -shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS) LDCONFIG = /sbin/ldconfig endif ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX)) @@ -115,11 +93,13 @@ endif ifeq (${OSARCH},SunOS) CFLAGS += -DSOLARIS -I../zaptel-solaris -LDCONFIG = +LDCONFIG = LDCONFIG_FLAGS = \# # Trick to comment out the period in the command below #INSTALL_PREFIX = /opt/asterisk # Uncomment out to install in standard Solaris location for 3rd party code endif +UTILITIES= pridump pritest rosetest testprilib + export PRIVERSION PRIVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .) @@ -145,7 +125,7 @@ SOFLAGS += -m32 endif -all: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) +all: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) $(UTILITIES) update: @if [ -d .svn ]; then \ @@ -171,37 +151,37 @@ install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir) #if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(libdir)/$(DYNAMIC_LIBRARY); fi - ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libpri.so.$(SONAME) libpri.so) + ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf $(DYNAMIC_LIBRARY) libpri.so) install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir) if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(libdir); fi else install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h install -f $(INSTALL_PREFIX)$(libdir) -m 755 $(DYNAMIC_LIBRARY) - ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libpri.so.$(SONAME) libpri.so) + ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf $(DYNAMIC_LIBRARY) libpri.so) install -f $(INSTALL_PREFIX)$(libdir) -m 644 $(STATIC_LIBRARY) endif uninstall: @echo "Removing Libpri" - rm -f $(INSTALL_PREFIX)$(libdir)/libpri.so.$(SONAME) + rm -f $(INSTALL_PREFIX)$(libdir)/$(STATIC_LIBRARY) rm -f $(INSTALL_PREFIX)$(libdir)/libpri.so - rm -f $(INSTALL_PREFIX)$(libdir)/libpri.a + rm -f $(INSTALL_PREFIX)$(libdir)/$(DYNAMIC_LIBRARY) rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h -pritest: pritest.o - $(CC) -o pritest pritest.o -L. -lpri $(CFLAGS) +pritest: pritest.o $(STATIC_LIBRARY) + $(CC) -o $@ $< $(STATIC_LIBRARY) $(CFLAGS) testprilib.o: testprilib.c - $(CC) $(CFLAGS) -D_REENTRANT -D_GNU_SOURCE -o $@ -c $< + $(CC) $(CFLAGS) -D_REENTRANT -D_GNU_SOURCE $(MAKE_DEPS) -c -o $@ $< -testprilib: testprilib.o - $(CC) -o testprilib testprilib.o -L. -lpri -lpthread $(CFLAGS) +testprilib: testprilib.o $(STATIC_LIBRARY) + $(CC) -o $@ $< $(STATIC_LIBRARY) -lpthread $(CFLAGS) -pridump: pridump.o - $(CC) -o pridump pridump.o -L. -lpri $(CFLAGS) +pridump: pridump.o $(DYNAMIC_LIBRARY) + $(CC) -o $@ $< -L. -lpri $(CFLAGS) -rosetest: rosetest.o - $(CC) -o rosetest rosetest.o -L. -lpri $(CFLAGS) +rosetest: rosetest.o $(STATIC_LIBRARY) + $(CC) -o $@ $< $(STATIC_LIBRARY) $(CFLAGS) MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$@).d -MP @@ -218,7 +198,7 @@ $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS) $(CC) $(SOFLAGS) -o $@ $(DYNAMIC_OBJS) $(LDCONFIG) $(LDCONFIG_FLAGS) . - ln -sf libpri.so.$(SONAME) libpri.so + ln -sf $(DYNAMIC_LIBRARY) libpri.so version.c: FORCE @build_tools/make_version_c > $@.tmp @@ -226,9 +206,9 @@ @rm -f $@.tmp clean: - rm -f *.o *.so *.lo *.so.$(SONAME) - rm -f testprilib $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) - rm -f pritest pridump + rm -f *.o *.so *.lo + rm -f $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) + rm -f $(UTILITIES) rm -f .*.d .PHONY: | ||
[-] [+] | Added | libpri-1.4.13.tar.bz2/libpri-1.4.13-summary.html ^ |
@@ -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> | ||
[-] [+] | Added | libpri-1.4.13.tar.bz2/libpri-1.4.13-summary.txt ^ |
@@ -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(-) + + ---------------------------------------------------------------------- | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/libpri.h ^ |
@@ -1892,6 +1892,31 @@ */ void pri_aoc_events_enable(struct pri *ctrl, int enable); +enum pri_layer2_persistence { + PRI_L2_PERSISTENCE_DEFAULT, + /*! Immediately bring layer 2 back up if the peer brings layer 2 down. */ + PRI_L2_PERSISTENCE_KEEP_UP, + /*! Leave layer 2 down if the peer brings layer 2 down. */ + PRI_L2_PERSISTENCE_LEAVE_DOWN, +#if 0 /* Possible future option. Would need to define how long to idle before dropping. */ + /*! Drop layer 2 on D channel idle. */ + PRI_L2_PERSISTENCE_IDLE_DROP, +#endif +}; + +/*! + * \brief Set the layer2 persistence option. + * + * \param ctrl D channel controller. + * \param option Layer 2 persistence to apply. + * + * \note + * Not all values are supported by all modes. + * + * \return Nothing + */ +void pri_persistent_layer2_option(struct pri *ctrl, enum pri_layer2_persistence option); + #define PRI_DISPLAY_OPTION_BLOCK (1 << 0) /*!< Do not pass display text. */ #define PRI_DISPLAY_OPTION_NAME_INITIAL (1 << 1) /*!< Use display in SETUP/CONNECT for name. */ #define PRI_DISPLAY_OPTION_NAME_UPDATE (1 << 2) /*!< Use display in FACILITY/NOTIFY for COLP name if appropriate. */ @@ -2154,7 +2179,7 @@ PRI_TIMER_T310, /*!< Maximum time between receiving a CALL_PROCEEDING and receiving a ALERT/CONNECT/DISCONNECT/PROGRESS */ PRI_TIMER_T313, /*!< Wait for CONNECT acknowledge, CPE side only */ PRI_TIMER_T314, - PRI_TIMER_T316, /*!< Maximum time between transmitting a RESTART and receiving a RESTART ACK */ + PRI_TIMER_T316, /*!< Time to wait for a RESTART ACK before retransmitting RESTART. (Timer enabled if greater than zero.) */ PRI_TIMER_T317, PRI_TIMER_T318, PRI_TIMER_T319, @@ -2196,6 +2221,7 @@ PRI_TIMER_QSIG_CC_T4, /*!< Path reservation supervision timeout. */ PRI_TIMER_T312, /*!< Supervise broadcast SETUP message call reference retention. */ + PRI_TIMER_N316, /*!< Number of times to transmit RESTART before giving up if T316 enabled. */ /* Must be last in the enum list */ PRI_MAX_TIMERS | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/pri.c ^ |
@@ -81,6 +81,7 @@ { "T313", PRI_TIMER_T313, PRI_ALL_SWITCHES }, { "T314", PRI_TIMER_T314, PRI_ALL_SWITCHES }, { "T316", PRI_TIMER_T316, PRI_ALL_SWITCHES }, + { "N316", PRI_TIMER_N316, PRI_ALL_SWITCHES }, { "T317", PRI_TIMER_T317, PRI_ALL_SWITCHES }, { "T318", PRI_TIMER_T318, PRI_ALL_SWITCHES }, { "T319", PRI_TIMER_T319, PRI_ALL_SWITCHES }, @@ -184,6 +185,10 @@ 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 */ +#if 0 /* Default disable the T316 timer otherwise the user cannot disable it. */ + ctrl->timers[PRI_TIMER_T316] = 2 * 60 * 1000; /* RESTART retransmit timer */ +#endif + ctrl->timers[PRI_TIMER_N316] = 2; /* Send RESTART this many times before giving up. */ ctrl->timers[PRI_TIMER_TM20] = 2500; /* Max time awaiting XID response - Q.921 Appendix IV */ ctrl->timers[PRI_TIMER_NM20] = 3; /* Number of XID retransmits - Q.921 Appendix IV */ @@ -292,6 +297,27 @@ /*! * \internal + * \brief Determine the default layer 2 persistence option. + * + * \param ctrl D channel controller. + * + * \return Default layer 2 persistence option. (legacy behaviour default) + */ +static enum pri_layer2_persistence pri_l2_persistence_option_default(struct pri *ctrl) +{ + enum pri_layer2_persistence persistence; + + if (PTMP_MODE(ctrl)) { + persistence = PRI_L2_PERSISTENCE_LEAVE_DOWN; + } else { + persistence = PRI_L2_PERSISTENCE_KEEP_UP; + } + + return persistence; +} + +/*! + * \internal * \brief Determine the default display text send options. * * \param ctrl D channel controller. @@ -558,6 +584,7 @@ ctrl->q931_rxcount = 0; ctrl->q931_txcount = 0; + ctrl->l2_persistence = pri_l2_persistence_option_default(ctrl); ctrl->display_flags.send = pri_display_options_send_default(ctrl); ctrl->display_flags.receive = pri_display_options_receive_default(ctrl); switch (switchtype) { @@ -951,7 +978,7 @@ q931_party_name_init(q931_name); if (pri_name->valid) { q931_name->valid = 1; - q931_name->presentation = pri_name->presentation; + q931_name->presentation = pri_name->presentation & PRI_PRES_RESTRICTION; q931_name->char_set = pri_name->char_set; libpri_copy_string(q931_name->str, pri_name->str, sizeof(q931_name->str)); } @@ -970,7 +997,8 @@ q931_party_number_init(q931_number); if (pri_number->valid) { q931_number->valid = 1; - q931_number->presentation = pri_number->presentation; + q931_number->presentation = pri_number->presentation + & (PRI_PRES_RESTRICTION | PRI_PRES_NUMBER_TYPE); q931_number->plan = pri_number->plan; libpri_copy_string(q931_number->str, pri_number->str, sizeof(q931_number->str)); } @@ -1772,7 +1800,8 @@ enum PRI_TIMERS_AND_COUNTERS tmr; tmr = pri_timer[idx].number; - if (0 <= ctrl->timers[tmr]) { + if (0 <= ctrl->timers[tmr] + || tmr == PRI_TIMER_T316) { used = pri_snprintf(buf, used, buf_size, " %s: %d\n", pri_timer[idx].name, ctrl->timers[tmr]); } @@ -1940,13 +1969,14 @@ q931_party_id_init(&sr->caller); if (caller) { sr->caller.number.valid = 1; - sr->caller.number.presentation = callerpres; + sr->caller.number.presentation = callerpres + & (PRI_PRES_RESTRICTION | PRI_PRES_NUMBER_TYPE); sr->caller.number.plan = callerplan; libpri_copy_string(sr->caller.number.str, caller, sizeof(sr->caller.number.str)); if (callername) { sr->caller.name.valid = 1; - sr->caller.name.presentation = callerpres; + sr->caller.name.presentation = callerpres & PRI_PRES_RESTRICTION; sr->caller.name.char_set = PRI_CHAR_SET_ISO8859_1; libpri_copy_string(sr->caller.name.str, callername, sizeof(sr->caller.name.str)); @@ -1970,7 +2000,8 @@ q931_party_redirecting_init(&sr->redirecting); if (num && num[0]) { sr->redirecting.from.number.valid = 1; - sr->redirecting.from.number.presentation = pres; + sr->redirecting.from.number.presentation = pres + & (PRI_PRES_RESTRICTION | PRI_PRES_NUMBER_TYPE); sr->redirecting.from.number.plan = plan; libpri_copy_string(sr->redirecting.from.number.str, num, sizeof(sr->redirecting.from.number.str)); @@ -2165,6 +2196,27 @@ } } +void pri_persistent_layer2_option(struct pri *ctrl, enum pri_layer2_persistence option) +{ + if (!ctrl) { + return; + } + if (PTMP_MODE(ctrl)) { + switch (option) { + case PRI_L2_PERSISTENCE_DEFAULT: + ctrl->l2_persistence = pri_l2_persistence_option_default(ctrl); + break; + case PRI_L2_PERSISTENCE_KEEP_UP: + case PRI_L2_PERSISTENCE_LEAVE_DOWN: + ctrl->l2_persistence = option; + break; + } + if (ctrl->l2_persistence == PRI_L2_PERSISTENCE_KEEP_UP) { + q921_bring_layer2_up(ctrl); + } + } +} + void pri_display_options_send(struct pri *ctrl, unsigned long flags) { if (!ctrl) { | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/pri_cc.c ^ |
@@ -2219,8 +2219,7 @@ party_a.number.presentation = PRI_PRES_ALLOWED | PRI_PRES_USER_NUMBER_UNSCREENED; } else { - party_a.number.presentation = - PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_UNSCREENED; + party_a.number.presentation = PRES_NUMBER_NOT_AVAILABLE; } } else { party_a.number.presentation = | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/pri_facility.c ^ |
@@ -632,6 +632,9 @@ rose_copy_number_to_q931(ctrl, q931_number, &rose_presented->screened.number); break; + case 2: /* numberNotAvailableDueToInterworking */ + q931_number->presentation = PRES_NUMBER_NOT_AVAILABLE; + break; default: q931_number->presentation |= PRI_PRES_USER_NUMBER_UNSCREENED; break; @@ -660,6 +663,9 @@ case 3: /* presentationRestrictedNumber */ rose_copy_number_to_q931(ctrl, q931_number, &rose_presented->number); break; + case 2: /* numberNotAvailableDueToInterworking */ + q931_number->presentation = PRES_NUMBER_NOT_AVAILABLE; + break; default: break; } @@ -693,6 +699,9 @@ rose_copy_subaddress_to_q931(ctrl, &q931_address->subaddress, &rose_presented->screened.subaddress); break; + case 2: /* numberNotAvailableDueToInterworking */ + q931_address->number.presentation = PRES_NUMBER_NOT_AVAILABLE; + break; default: q931_address->number.presentation |= PRI_PRES_USER_NUMBER_UNSCREENED; break; @@ -1871,6 +1880,7 @@ } pri_copy_party_id_to_q931(&called, mailbox); + q931_party_id_fixup(ctrl, &called); if (rose_mwi_indicate_encode(ctrl, call, vm_id, basic_service, num_messages, caller_id, timestamp, message_reference, message_status) || q931_facility_called(ctrl, call, &called)) { @@ -4564,8 +4574,7 @@ party_id.number.presentation = PRI_PRES_ALLOWED | PRI_PRES_USER_NUMBER_UNSCREENED; } else { - party_id.number.presentation = - PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_UNSCREENED; + party_id.number.presentation = PRES_NUMBER_NOT_AVAILABLE; } } else { q931_party_number_init(&party_id.number); | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/pri_internal.h ^ |
@@ -120,6 +120,8 @@ /*! Layer 2 link control for D channel. */ struct q921_link link; + /*! Layer 2 persistence option. */ + enum pri_layer2_persistence l2_persistence; /*! T201 TEI Identity Check timer. */ int t201_timer; /*! Number of times T201 has expired. */ @@ -623,7 +625,9 @@ /*! Display text ie contents. */ struct { /*! Display ie text. NULL if not present or consumed as remote name. */ - const char *text; + const unsigned char *text; + /*! Full IE code of received display text */ + int full_ie; /*! Length of display text. */ unsigned char length; /*! @@ -645,6 +649,29 @@ /* AOC charge requesting on Setup */ int aoc_charging_request; + + unsigned int slotmap_size:1;/* TRUE if the slotmap is E1 (32 bits). */ + + /*! Control the RESTART reception to the upper layer. */ + struct { + /*! Timer ID of RESTART notification events to upper layer. */ + int timer; + /*! Current RESTART notification index. */ + int idx; + /*! Number of channels in the channel ID list. */ + int count; + /*! Channel ID list */ + char chan_no[32]; + } restart; + /*! Control the RESTART retransmissions. */ + struct { + /*! T316 RESTART retransmit timer. */ + int t316_timer; + /*! Number of times remaining that RESTART can be transmitted. */ + int remain; + /*! Encoded RESTART channel id. */ + int channel; + } restart_tx; }; enum CC_STATES { | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/pri_q921.h ^ |
@@ -252,7 +252,7 @@ int n202_counter; /*! Max idle time */ int t203_timer; - /*! PTP restart delay timer */ + /*! Layer 2 persistence restart delay timer */ int restart_timer; /* MDL variables */ @@ -273,10 +273,11 @@ } /* Dumps a *known good* Q.921 packet */ -extern void q921_dump(struct pri *pri, q921_h *h, int len, int showraw, int txrx); +extern void q921_dump(struct pri *pri, q921_h *h, int len, int debugflags, int txrx); /* Bring up the D-channel */ void q921_start(struct q921_link *link); +void q921_bring_layer2_up(struct pri *ctrl); //extern void q921_reset(struct pri *pri, int reset_iqueue); | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/pridump.c ^ |
@@ -42,7 +42,7 @@ #include <sys/ioctl.h> #include <sys/select.h> #include <sys/types.h> -#include <zaptel/zaptel.h> +#include <dahdi/user.h> #include "libpri.h" #include "pri_q921.h" #include "pri_q931.h" @@ -50,18 +50,18 @@ static int pri_open(char *dev) { int dfd; - struct zt_params p; + struct dahdi_params p; dfd = open(dev, O_RDWR); if (dfd < 0) { fprintf(stderr, "Failed to open dchannel '%s': %s\n", dev, strerror(errno)); return -1; } - if (ioctl(dfd, ZT_GET_PARAMS, &p)) { + if (ioctl(dfd, DAHDI_GET_PARAMS, &p)) { fprintf(stderr, "Unable to get parameters on '%s': %s\n", dev, strerror(errno)); return -1; } - if ((p.sigtype != ZT_SIG_HDLCRAW) && (p.sigtype != ZT_SIG_HDLCFCS)) { + if ((p.sigtype != DAHDI_SIG_HDLCRAW) && (p.sigtype != DAHDI_SIG_HDLCFCS)) { fprintf(stderr, "%s is in %d signalling, not FCS HDLC or RAW HDLC mode\n", dev, p.sigtype); return -1; } @@ -71,7 +71,7 @@ static void dump_packet(struct pri *pri, char *buf, int len, int txrx) { q921_h *h = (q921_h *)buf; - q921_dump(pri, h, len, 1, txrx); + q921_dump(pri, h, len, PRI_DEBUG_ALL, txrx); if (!((h->h.data[0] & Q921_FRAMETYPE_MASK) & 0x3)) { q931_dump(pri, h->h.tei, (q931_h *)(h->i.data), len - 4 - 2 /* FCS */, txrx); } @@ -80,7 +80,7 @@ } -static int pri_bridge(int d1, int d2) +static void pri_bridge(int d1, int d2) { char buf[1024]; fd_set fds; @@ -94,8 +94,8 @@ max = d1; if (max < d2) max = d2; - ioctl(d1, ZT_GETEVENT, &e); - ioctl(d2, ZT_GETEVENT, &e); + ioctl(d1, DAHDI_GETEVENT, &e); + ioctl(d2, DAHDI_GETEVENT, &e); res = select(max + 1, &fds, NULL, NULL, NULL); if (res < 0) { fprintf(stderr, "Select returned %d: %s\n", res, strerror(errno)); | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/q921.c ^ |
@@ -186,7 +186,7 @@ ctrl->q921_txcount++; /* Just send it raw */ if (ctrl->debug & (PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW)) - q921_dump(ctrl, h, len, ctrl->debug & PRI_DEBUG_Q921_RAW, 1); + q921_dump(ctrl, h, len, ctrl->debug, 1); /* Write an extra two bytes for the FCS */ res = ctrl->write_func ? ctrl->write_func(ctrl, h, len + 2) : 0; if (res != (len + 2)) { @@ -235,7 +235,10 @@ link->t202_timer = pri_schedule_event(ctrl, ctrl->timers[PRI_TIMER_T202], t202_expire, link); - ++link->n202_counter; + if (ctrl->l2_persistence != PRI_L2_PERSISTENCE_KEEP_UP) { + /* Only try to get a TEI for N202 times if layer 2 is not persistent. */ + ++link->n202_counter; + } if (!link->t202_timer || link->n202_counter > ctrl->timers[PRI_TIMER_N202]) { if (!link->t202_timer) { pri_error(ctrl, "Could not start T202 timer."); @@ -530,26 +533,62 @@ } } -static void restart_timer_expire(void *vlink) +/*! + * \internal + * \brief Initiate bringing up layer 2 link. + * + * \param link Layer 2 link to bring up. + * + * \return Nothing + */ +static void kick_start_link(struct q921_link *link) { - struct q921_link *link = vlink; struct pri *ctrl; ctrl = link->ctrl; - if (ctrl->debug & PRI_DEBUG_Q921_STATE) { - pri_message(ctrl, "SAPI/TEI=%d/%d Kick starting link\n", link->sapi, link->tei); + switch (link->state) { + case Q921_TEI_UNASSIGNED: + if (ctrl->debug & PRI_DEBUG_Q921_STATE) { + pri_message(ctrl, "Kick starting link from no TEI.\n"); + } + q921_setstate(link, Q921_ESTABLISH_AWAITING_TEI); + q921_tei_request(link); + break; + case Q921_ASSIGN_AWAITING_TEI: + if (ctrl->debug & PRI_DEBUG_Q921_STATE) { + pri_message(ctrl, "Kick starting link when get TEI.\n"); + } + q921_setstate(link, Q921_ESTABLISH_AWAITING_TEI); + break; + case Q921_TEI_ASSIGNED: + if (ctrl->debug & PRI_DEBUG_Q921_STATE) { + pri_message(ctrl, "SAPI/TEI=%d/%d Kick starting link\n", link->sapi, + link->tei); + } + q921_discard_iqueue(link); + q921_establish_data_link(link); + link->l3_initiated = 1; + q921_setstate(link, Q921_AWAITING_ESTABLISHMENT); + break; + default: + break; } +} + +static void restart_timer_expire(void *vlink) +{ + struct q921_link *link = vlink; + struct pri *ctrl; + + ctrl = link->ctrl; link->restart_timer = 0; switch (link->state) { case Q921_TEI_ASSIGNED: /* Try to bring layer 2 up. */ - q921_discard_iqueue(link); - q921_establish_data_link(link); - link->l3_initiated = 1; - q921_setstate(link, Q921_AWAITING_ESTABLISHMENT); + kick_start_link(link); break; default: /* Looks like someone forgot to stop the restart timer. */ @@ -568,6 +607,7 @@ link->restart_timer = 0; } +/*! \note Only call on the transition to state Q921_TEI_ASSIGNED or already there. */ static void restart_timer_start(struct q921_link *link) { struct pri *ctrl; @@ -583,21 +623,27 @@ pri_schedule_event(ctrl, ctrl->timers[PRI_TIMER_T200], restart_timer_expire, link); } -static pri_event *q921_ptp_delay_restart(struct q921_link *link) +/*! \note Only call on the transition to state Q921_TEI_ASSIGNED or already there. */ +static pri_event *q921_check_delay_restart(struct q921_link *link) { pri_event *ev; struct pri *ctrl; ctrl = link->ctrl; - if (PTP_MODE(ctrl)) { + if (ctrl->l2_persistence == PRI_L2_PERSISTENCE_KEEP_UP) { /* + * For PTP links: * This is where we act a bit like L3 instead of L2, since we've * got an L3 that depends on us keeping L2 automatically alive - * and happy for PTP links. + * and happy. + * + * For PTMP links: + * We can optionally keep L2 automatically alive and happy. */ restart_timer_start(link); - + } + if (PTP_MODE(ctrl)) { switch (link->state) { case Q921_MULTI_FRAME_ESTABLISHED: case Q921_TIMER_RECOVERY: @@ -616,6 +662,31 @@ return ev; } +/*! + * \brief Bring all layer 2 links up. + * + * \param ctrl D channel controller. + * + * \return Nothing + */ +void q921_bring_layer2_up(struct pri *ctrl) +{ + struct q921_link *link; + + if (PTMP_MODE(ctrl)) { + /* Don't start with the broadcast link. */ + link = ctrl->link.next; + } else { + link = &ctrl->link; + } + for (; link; link = link->next) { + if (!link->restart_timer) { + /* A restart on the link is not already in the works. */ + kick_start_link(link); + } + } +} + /* This is the equivalent of the I-Frame queued up path in Figure B.7 in MULTI_FRAME_ESTABLISHED */ static int q921_send_queued_iframes(struct q921_link *link) { @@ -859,7 +930,7 @@ q921_send_sabme(link); start_t200(link); } else { - q921_ptp_delay_restart(link); + q921_check_delay_restart(link); q921_discard_iqueue(link); q921_mdl_error(link, 'G'); q921_setstate(link, Q921_TEI_ASSIGNED); @@ -873,7 +944,7 @@ q921_send_disc(link, 1); start_t200(link); } else { - q921_ptp_delay_restart(link); + q921_check_delay_restart(link); q921_mdl_error(link, 'H'); /* DL-RELEASE confirm */ q931_dl_event(link, Q931_DL_EVENT_DL_RELEASE_CONFIRM); @@ -1116,7 +1187,7 @@ static void q921_dump_pri_by_h(struct pri *ctrl, char direction_tag, q921_h *h); -void q921_dump(struct pri *ctrl, q921_h *h, int len, int showraw, int txrx) +void q921_dump(struct pri *ctrl, q921_h *h, int len, int debugflags, int txrx) { int x; const char *type; @@ -1125,9 +1196,11 @@ direction_tag = txrx ? '>' : '<'; pri_message(ctrl, "\n"); - q921_dump_pri_by_h(ctrl, direction_tag, h); + if (debugflags & PRI_DEBUG_Q921_DUMP) { + q921_dump_pri_by_h(ctrl, direction_tag, h); + } - if (showraw) { + if (debugflags & PRI_DEBUG_Q921_RAW) { char *buf = malloc(len * 3 + 1); int buflen = 0; if (buf) { @@ -1138,132 +1211,134 @@ } } - switch (h->h.data[0] & Q921_FRAMETYPE_MASK) { - case 0: - case 2: - pri_message(ctrl, "%c Informational frame:\n", direction_tag); - break; - case 1: - pri_message(ctrl, "%c Supervisory frame:\n", direction_tag); - break; - case 3: - pri_message(ctrl, "%c Unnumbered frame:\n", direction_tag); - break; - } - - pri_message(ctrl, "%c SAPI: %02d C/R: %d EA: %d\n", - direction_tag, - h->h.sapi, - h->h.c_r, - h->h.ea1); - pri_message(ctrl, "%c TEI: %03d EA: %d\n", - direction_tag, - h->h.tei, - h->h.ea2); - - switch (h->h.data[0] & Q921_FRAMETYPE_MASK) { - case 0: - case 2: - /* Informational frame */ - pri_message(ctrl, "%c N(S): %03d 0: %d\n", - direction_tag, - h->i.n_s, - h->i.ft); - pri_message(ctrl, "%c N(R): %03d P: %d\n", - direction_tag, - h->i.n_r, - h->i.p_f); - pri_message(ctrl, "%c %d bytes of data\n", - direction_tag, - len - 4); - break; - case 1: - /* Supervisory frame */ - type = "???"; - switch (h->s.ss) { + if (debugflags & PRI_DEBUG_Q921_DUMP) { + switch (h->h.data[0] & Q921_FRAMETYPE_MASK) { case 0: - type = "RR (receive ready)"; + case 2: + pri_message(ctrl, "%c Informational frame:\n", direction_tag); break; case 1: - type = "RNR (receive not ready)"; + pri_message(ctrl, "%c Supervisory frame:\n", direction_tag); break; - case 2: - type = "REJ (reject)"; + case 3: + pri_message(ctrl, "%c Unnumbered frame:\n", direction_tag); break; } - pri_message(ctrl, "%c Zero: %d S: %d 01: %d [ %s ]\n", - direction_tag, - h->s.x0, - h->s.ss, - h->s.ft, - type); - pri_message(ctrl, "%c N(R): %03d P/F: %d\n", + + pri_message(ctrl, "%c SAPI: %02d C/R: %d EA: %d\n", direction_tag, - h->s.n_r, - h->s.p_f); - pri_message(ctrl, "%c %d bytes of data\n", + h->h.sapi, + h->h.c_r, + h->h.ea1); + pri_message(ctrl, "%c TEI: %03d EA: %d\n", direction_tag, - len - 4); - break; - case 3: - /* Unnumbered frame */ - type = "???"; - if (h->u.ft == 3) { - switch (h->u.m3) { + h->h.tei, + h->h.ea2); + + switch (h->h.data[0] & Q921_FRAMETYPE_MASK) { + case 0: + case 2: + /* Informational frame */ + pri_message(ctrl, "%c N(S): %03d 0: %d\n", + direction_tag, + h->i.n_s, + h->i.ft); + pri_message(ctrl, "%c N(R): %03d P: %d\n", + direction_tag, + h->i.n_r, + h->i.p_f); + pri_message(ctrl, "%c %d bytes of data\n", + direction_tag, + len - 4); + break; + case 1: + /* Supervisory frame */ + type = "???"; + switch (h->s.ss) { case 0: - if (h->u.m2 == 3) - type = "DM (disconnect mode)"; - else if (h->u.m2 == 0) - type = "UI (unnumbered information)"; - break; - case 2: - if (h->u.m2 == 0) - type = "DISC (disconnect)"; - break; - case 3: - if (h->u.m2 == 3) - type = "SABME (set asynchronous balanced mode extended)"; - else if (h->u.m2 == 0) - type = "UA (unnumbered acknowledgement)"; - break; - case 4: - if (h->u.m2 == 1) - type = "FRMR (frame reject)"; + type = "RR (receive ready)"; break; - case 5: - if (h->u.m2 == 3) - type = "XID (exchange identification note)"; + case 1: + type = "RNR (receive not ready)"; break; - default: + case 2: + type = "REJ (reject)"; break; } + pri_message(ctrl, "%c Zero: %d S: %d 01: %d [ %s ]\n", + direction_tag, + h->s.x0, + h->s.ss, + h->s.ft, + type); + pri_message(ctrl, "%c N(R): %03d P/F: %d\n", + direction_tag, + h->s.n_r, + h->s.p_f); + pri_message(ctrl, "%c %d bytes of data\n", + direction_tag, + len - 4); + break; + case 3: + /* Unnumbered frame */ + type = "???"; + if (h->u.ft == 3) { + switch (h->u.m3) { + case 0: + if (h->u.m2 == 3) + type = "DM (disconnect mode)"; + else if (h->u.m2 == 0) + type = "UI (unnumbered information)"; + break; + case 2: + if (h->u.m2 == 0) + type = "DISC (disconnect)"; + break; + case 3: + if (h->u.m2 == 3) + type = "SABME (set asynchronous balanced mode extended)"; + else if (h->u.m2 == 0) + type = "UA (unnumbered acknowledgement)"; + break; + case 4: + if (h->u.m2 == 1) + type = "FRMR (frame reject)"; + break; + case 5: + if (h->u.m2 == 3) + type = "XID (exchange identification note)"; + break; + default: + break; + } + } + pri_message(ctrl, "%c M3: %d P/F: %d M2: %d 11: %d [ %s ]\n", + direction_tag, + h->u.m3, + h->u.p_f, + h->u.m2, + h->u.ft, + type); + pri_message(ctrl, "%c %d bytes of data\n", + direction_tag, + len - 3); + break; } - pri_message(ctrl, "%c M3: %d P/F: %d M2: %d 11: %d [ %s ]\n", - direction_tag, - h->u.m3, - h->u.p_f, - h->u.m2, - h->u.ft, - type); - pri_message(ctrl, "%c %d bytes of data\n", - direction_tag, - len - 3); - break; - } - - if ((h->u.ft == 3) && (h->u.m3 == 0) && (h->u.m2 == 0) && (h->u.data[0] == 0x0f)) { - int ri; - u_int8_t *action; - - /* TEI management related */ - type = q921_tei_mgmt2str(h->u.data[3]); - pri_message(ctrl, "%c MDL Message: %d(%s)\n", direction_tag, h->u.data[3], type); - ri = (h->u.data[1] << 8) | h->u.data[2]; - pri_message(ctrl, "%c Ri: %d\n", direction_tag, ri); - action = &h->u.data[4]; - for (x = len - (action - (u_int8_t *) h); 0 < x; --x, ++action) { - pri_message(ctrl, "%c Ai: %d E:%d\n", - direction_tag, (*action >> 1) & 0x7f, *action & 0x01); + + if ((h->u.ft == 3) && (h->u.m3 == 0) && (h->u.m2 == 0) && (h->u.data[0] == 0x0f)) { + int ri; + u_int8_t *action; + + /* TEI management related */ + type = q921_tei_mgmt2str(h->u.data[3]); + pri_message(ctrl, "%c MDL Message: %d(%s)\n", direction_tag, h->u.data[3], type); + ri = (h->u.data[1] << 8) | h->u.data[2]; + pri_message(ctrl, "%c Ri: %d\n", direction_tag, ri); + action = &h->u.data[4]; + for (x = len - (action - (u_int8_t *) h); 0 < x; --x, ++action) { + pri_message(ctrl, "%c Ai: %d E:%d\n", + direction_tag, (*action >> 1) & 0x7f, *action & 0x01); + } } } } @@ -1409,8 +1484,20 @@ int tei; if (!BRI_NT_PTMP(ctrl) && !BRI_TE_PTMP(ctrl)) { - return pri_mkerror(ctrl, - "Received MDL/TEI managemement message, but configured for mode other than PTMP!\n"); + /* + * 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) { @@ -1471,12 +1558,13 @@ if (ctrl->debug & PRI_DEBUG_Q921_STATE) { pri_message(ctrl, "Allocating new TEI %d\n", tei); } - sub->next = pri_link_new(ctrl, Q921_SAPI_CALL_CTRL, tei); - if (!sub->next) { + link = pri_link_new(ctrl, Q921_SAPI_CALL_CTRL, tei); + if (!link) { pri_error(ctrl, "Unable to allocate layer 2 link for new TEI %d\n", tei); return NULL; } - q921_setstate(sub->next, Q921_TEI_ASSIGNED); + sub->next = link; + q921_setstate(link, Q921_TEI_ASSIGNED); q921_send_tei(ctrl, Q921_TEI_IDENTITY_ASSIGNED, ri, tei, 1); count = 0; @@ -1493,6 +1581,15 @@ } q921_tei_check(ctrl); } + + if (ctrl->l2_persistence == PRI_L2_PERSISTENCE_KEEP_UP) { + /* + * Layer 2 is persistent so give the peer some time to setup + * it's new TEI and bring the link up itself before we bring the + * link up. + */ + restart_timer_start(link); + } break; case Q921_TEI_IDENTITY_CHECK_RESPONSE: if (!BRI_NT_PTMP(ctrl)) { @@ -1562,7 +1659,12 @@ switch (link->state) { case Q921_TEI_UNASSIGNED: - /* We do not have a TEI and we are not asking for one. */ + /* + * We do not have a TEI and we are not currently asking for one. + * Start asking for one. + */ + q921_setstate(link, Q921_ASSIGN_AWAITING_TEI); + q921_tei_request(link); return NULL; case Q921_ASSIGN_AWAITING_TEI: case Q921_ESTABLISH_AWAITING_TEI: @@ -1604,9 +1706,12 @@ switch (link->state) { case Q921_ASSIGN_AWAITING_TEI: q921_setstate(link, Q921_TEI_ASSIGNED); - ctrl->ev.gen.e = PRI_EVENT_DCHAN_UP; - res = &ctrl->ev; - break; + if (ctrl->l2_persistence != PRI_L2_PERSISTENCE_KEEP_UP) { + ctrl->ev.gen.e = PRI_EVENT_DCHAN_UP; + res = &ctrl->ev; + break; + } + /* Fall through: Layer 2 is persistent so bring it up. */ case Q921_ESTABLISH_AWAITING_TEI: q921_establish_data_link(link); link->l3_initiated = 1; @@ -1765,7 +1870,7 @@ break; case Q921_MULTI_FRAME_ESTABLISHED: case Q921_TIMER_RECOVERY: - res = q921_ptp_delay_restart(link); + res = q921_check_delay_restart(link); q921_discard_iqueue(link); q921_send_ua(link, h->u.p_f); /* DL-RELEASE indication */ @@ -2177,7 +2282,7 @@ if (!h->u.p_f) { q921_mdl_error(link, 'D'); } else { - res = q921_ptp_delay_restart(link); + res = q921_check_delay_restart(link); /* DL-RELEASE confirm */ q931_dl_event(link, Q931_DL_EVENT_DL_RELEASE_CONFIRM); stop_t200(link); @@ -2615,7 +2720,7 @@ if (!h->u.p_f) break; - res = q921_ptp_delay_restart(link); + res = q921_check_delay_restart(link); q921_discard_iqueue(link); /* DL-RELEASE indication */ q931_dl_event(link, Q931_DL_EVENT_DL_RELEASE_IND); @@ -2625,7 +2730,7 @@ case Q921_AWAITING_RELEASE: if (!h->u.p_f) break; - res = q921_ptp_delay_restart(link); + res = q921_check_delay_restart(link); /* DL-RELEASE confirm */ q931_dl_event(link, Q931_DL_EVENT_DL_RELEASE_CONFIRM); stop_t200(link); @@ -2917,7 +3022,7 @@ len -= 2; if (ctrl->debug & (PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW)) { - q921_dump(ctrl, h, len, ctrl->debug & PRI_DEBUG_Q921_RAW, 0); + q921_dump(ctrl, h, len, ctrl->debug, 0); } /* Check some reject conditions -- Start by rejecting improper ea's */ | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/q931.c ^ |
@@ -432,7 +432,7 @@ void q931_party_number_init(struct q931_party_number *number) { number->valid = 0; - number->presentation = PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_UNSCREENED; + number->presentation = PRES_NUMBER_NOT_AVAILABLE; number->plan = (PRI_TON_UNKNOWN << 4) | PRI_NPI_E163_E164; number->str[0] = '\0'; } @@ -730,7 +730,7 @@ pri_name->valid = 0; pri_name->presentation = PRI_PRES_UNAVAILABLE; pri_name->char_set = PRI_CHAR_SET_ISO8859_1; - pri_name->str[0] = 0; + pri_name->str[0] = '\0'; } } @@ -751,9 +751,9 @@ libpri_copy_string(pri_number->str, q931_number->str, sizeof(pri_number->str)); } else { pri_number->valid = 0; - pri_number->presentation = PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_UNSCREENED; + pri_number->presentation = PRES_NUMBER_NOT_AVAILABLE; pri_number->plan = (PRI_TON_UNKNOWN << 4) | PRI_NPI_E163_E164; - pri_number->str[0] = 0; + pri_number->str[0] = '\0'; } } @@ -854,7 +854,8 @@ case PRI_SWITCH_DMS100: case PRI_SWITCH_ATT4ESS: /* Doesn't like certain presentation types */ - if (id->number.valid && !(id->number.presentation & 0x7c)) { + if (id->number.valid + && (id->number.presentation & PRI_PRES_RESTRICTION) == PRI_PRES_ALLOWED) { /* i.e., If presentation is allowed it must be a network number */ id->number.presentation = PRES_ALLOWED_NETWORK_NUMBER; } @@ -932,12 +933,121 @@ if (name_priority < number_priority) { number_value = name_value; } + if (number_value == PRI_PRES_UNAVAILABLE) { + return PRES_NUMBER_NOT_AVAILABLE; + } return number_value | number_screening; } /*! * \internal + * \brief Get binary buffer contents into the destination buffer. + * + * \param dst Destination buffer. + * \param dst_size Destination buffer sizeof() + * \param src Source buffer. + * \param src_len Source buffer length to copy. + * + * \note The destination buffer is nul terminated just in case + * the contents are used as a string anyway. + * + * \retval 0 on success. + * \retval -1 on error. The copy did not happen. + */ +static int q931_memget(unsigned char *dst, size_t dst_size, const unsigned char *src, int src_len) +{ + if (src_len < 0 || src_len > dst_size - 1) { + dst[0] = 0; + return -1; + } + memcpy(dst, src, src_len); + dst[src_len] = 0; + return 0; +} + +/*! + * \internal + * \brief Get source buffer contents into the destination buffer for a string. + * + * \param dst Destination buffer. + * \param dst_size Destination buffer sizeof() + * \param src Source buffer. + * \param src_len Source buffer length to copy. + * + * \note The destination buffer is nul terminated. + * \note Nul bytes from the source buffer are not copied. + * + * \retval 0 on success. + * \retval -1 if nul bytes were found in the source data. + */ +static int q931_strget(unsigned char *dst, size_t dst_size, const unsigned char *src, int src_len) +{ + int saw_nul; + + if (src_len < 1) { + dst[0] = '\0'; + return 0; + } + + saw_nul = 0; + --dst_size; + while (dst_size && src_len) { + if (*src) { + *dst++ = *src; + --dst_size; + } else { + /* Skip nul bytes in the source buffer. */ + saw_nul = -1; + } + ++src; + --src_len; + } + *dst = '\0'; + + return saw_nul; +} + + +/*! + * \internal + * \brief Get source buffer contents into the destination buffer for a string. + * + * \param ctrl D channel controller. + * \param ie_name IE name to report nul bytes found in. + * \param dst Destination buffer. + * \param dst_size Destination buffer sizeof() + * \param src Source buffer. + * \param src_len Source buffer length to copy. + * + * \note The destination buffer is nul terminated. + * \note Nul bytes from the source buffer are not copied. + * + * \retval 0 on success. + * \retval -1 if nul bytes were found in the source data. + */ +static int q931_strget_gripe(struct pri *ctrl, const char *ie_name, unsigned char *dst, size_t dst_size, const unsigned char *src, int src_len) +{ + int saw_nul; + +/* To quietly remove nul octets just comment out the following line. */ +#define UNCONDITIONALLY_REPORT_REMOVED_NUL_OCTETS 1 + + saw_nul = q931_strget(dst, dst_size, src, src_len); + if (saw_nul +#if !defined(UNCONDITIONALLY_REPORT_REMOVED_NUL_OCTETS) + && (ctrl->debug & PRI_DEBUG_Q931_STATE) +#endif + ) { + pri_message(ctrl, "!! Removed nul octets from IE '%s' and returning '%s'.\n", + ie_name, dst); + } + + return saw_nul; +} + +/*! + * \internal * \brief Clear the display text. * * \param call Q.931 call to clear display text. @@ -962,7 +1072,8 @@ if (name->valid) { switch (name->presentation & PRI_PRES_RESTRICTION) { case PRI_PRES_ALLOWED: - call->display.text = (char *) name->str; + call->display.text = (unsigned char *) name->str; + call->display.full_ie = 0; call->display.length = strlen(name->str); call->display.char_set = name->char_set; break; @@ -997,12 +1108,9 @@ name->valid = 1; name->char_set = call->display.char_set; - if (call->display.length < sizeof(name->str)) { - memcpy(name->str, call->display.text, call->display.length); - name->str[call->display.length] = '\0'; - } else { - name->str[0] = '\0'; - } + q931_strget_gripe(call->pri, ie2str(call->display.full_ie), + (unsigned char *) name->str, sizeof(name->str), call->display.text, + call->display.length); if (name->str[0]) { name->presentation = PRI_PRES_ALLOWED; } else { @@ -1038,16 +1146,10 @@ /* Setup display text subcommand */ subcmd->cmd = PRI_SUBCMD_DISPLAY_TEXT; subcmd->u.display.char_set = call->display.char_set; - if (call->display.length < sizeof(subcmd->u.display.text)) { - subcmd->u.display.length = call->display.length; - } else { - /* Truncate display text and leave room for a null terminator. */ - subcmd->u.display.length = sizeof(subcmd->u.display.text) - 1; - } - memcpy(subcmd->u.display.text, call->display.text, subcmd->u.display.length); - - /* Make sure display text is null terminated. */ - subcmd->u.display.text[subcmd->u.display.length] = '\0'; + q931_strget_gripe(ctrl, ie2str(call->display.full_ie), + (unsigned char *) subcmd->u.display.text, sizeof(subcmd->u.display.text), + call->display.text, call->display.length); + subcmd->u.display.length = strlen(subcmd->u.display.text); } } @@ -1156,6 +1258,8 @@ int pos = 0; int need_extended_channel_octets;/*!< TRUE if octets 3.2 and 3.3 need to be present. */ + call->restart.count = 0; + if (ie->data[0] & 0x08) { call->chanflags = FLAG_EXCLUSIVE; } else { @@ -1224,32 +1328,62 @@ /* More coming */ if ((ie->data[pos] & 0x0f) != 3) { /* Channel type/mapping is not for B channel units. */ - pri_error(ctrl, "!! Unexpected Channel Type %d\n", ie->data[1] & 0x0f); + pri_error(ctrl, "!! Unexpected Channel Type %d\n", ie->data[pos] & 0x0f); return -1; } if ((ie->data[pos] & 0x60) != 0) { - pri_error(ctrl, "!! Invalid CCITT coding %d\n", (ie->data[1] & 0x60) >> 5); + pri_error(ctrl, "!! Invalid CCITT coding %d\n", (ie->data[pos] & 0x60) >> 5); return -1; } if (ie->data[pos] & 0x10) { - /* - * Expect Slot Map - * Note that we are assuming only T1's use slot maps which is wrong - * but oh well... We would need to know what type of line we are - * connected with (T1 or E1) to interpret the map correctly anyway. - */ + /* Expect Slot Map */ call->slotmap = 0; pos++; - for (x=0;x<3;x++) { + call->slotmap_size = (ie->len - pos > 3) ? 1 : 0; + for (x = 0; x < (call->slotmap_size ? 4 : 3); ++x) { call->slotmap <<= 8; call->slotmap |= ie->data[x + pos]; } + + if (msgtype == Q931_RESTART) { + int bit; + + /* Convert the slotmap to a channel list for RESTART support. */ + for (bit = 0; bit < ARRAY_LEN(call->restart.chan_no); ++bit) { + if (call->slotmap & (1UL << bit)) { + call->restart.chan_no[call->restart.count++] = bit + + (call->slotmap_size ? 0 : 1); + } + } + } } else { pos++; /* Only expect a particular channel */ call->channelno = ie->data[pos] & 0x7f; - if (ctrl->chan_mapping_logical && call->channelno > 15) + if (ctrl->chan_mapping_logical && call->channelno > 15) { call->channelno++; + } + + if (msgtype == Q931_RESTART) { + /* Read in channel list for RESTART support. */ + while (call->restart.count < ARRAY_LEN(call->restart.chan_no)) { + int chan_no; + + chan_no = ie->data[pos] & 0x7f; + if (ctrl->chan_mapping_logical && chan_no > 15) { + ++chan_no; + } + call->restart.chan_no[call->restart.count++] = chan_no; + if (ie->data[pos++] & 0x80) { + /* Channel list finished. */ + break; + } + if (ie->len <= pos) { + /* No more ie contents. */ + break; + } + } + } } } return 0; @@ -1322,17 +1456,35 @@ if (0 < call->channelno && call->channelno != 0xff) { /* Channel number specified and preferred over slot map if we have one. */ ++pos; - if (ctrl->chan_mapping_logical && call->channelno > 16) { - ie->data[pos++] = 0x80 | (call->channelno - 1); + if (msgtype == Q931_RESTART_ACKNOWLEDGE && call->restart.count) { + int chan_no; + int idx; + + /* Build RESTART_ACKNOWLEDGE channel list */ + for (idx = 0; idx < call->restart.count; ++idx) { + chan_no = call->restart.chan_no[idx]; + if (ctrl->chan_mapping_logical && chan_no > 16) { + --chan_no; + } + if (call->restart.count <= idx + 1) { + /* Last channel list channel. */ + chan_no |= 0x80; + } + ie->data[pos++] = chan_no; + } } else { - ie->data[pos++] = 0x80 | call->channelno; + if (ctrl->chan_mapping_logical && call->channelno > 16) { + ie->data[pos++] = 0x80 | (call->channelno - 1); + } else { + ie->data[pos++] = 0x80 | call->channelno; + } } } else if (call->slotmap != -1) { int octet; /* We have to send a slot map */ ie->data[pos++] |= 0x10; - for (octet = 3; octet--;) { + for (octet = call->slotmap_size ? 4 : 3; octet--;) { ie->data[pos++] = (call->slotmap >> (8 * octet)) & 0xff; } } else { @@ -1357,8 +1509,8 @@ }; pri_message(ctrl, - "%c Channel ID (len=%2d) [ Ext: %d IntID: %s %s Spare: %d %s Dchan: %d\n", - prefix, len, + "%c %s (len=%2d) [ Ext: %d IntID: %s %s Spare: %d %s Dchan: %d\n", + prefix, ie2str(full_ie), len, (ie->data[0] & 0x80) ? 1 : 0, (ie->data[0] & 0x40) ? "Explicit" : "Implicit", (ie->data[0] & 0x20) ? "Other(PRI)" : "BRI", @@ -1427,8 +1579,9 @@ static void dump_restart_indicator(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Restart Indentifier (len=%2d) [ Ext: %d Spare: %d Resetting %s (%d) ]\n", - prefix, len, (ie->data[0] & 0x80) >> 7, (ie->data[0] & 0x78) >> 3, ri2str(ie->data[0] & 0x7), ie->data[0] & 0x7); + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d Spare: %d Resetting %s (%d) ]\n", + prefix, ie2str(full_ie), len, (ie->data[0] & 0x80) >> 7, + (ie->data[0] & 0x78) >> 3, ri2str(ie->data[0] & 0x7), ie->data[0] & 0x7); } static int receive_restart_indicator(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -1553,13 +1706,16 @@ static void dump_bearer_capability(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { int pos=2; - pri_message(ctrl, "%c Bearer Capability (len=%2d) [ Ext: %d Coding-Std: %d Info transfer capability: %s (%d)\n", - prefix, len, (ie->data[0] & 0x80 ) >> 7, (ie->data[0] & 0x60) >> 5, cap2str(ie->data[0] & 0x1f), (ie->data[0] & 0x1f)); + pri_message(ctrl, + "%c %s (len=%2d) [ Ext: %d Coding-Std: %d Info transfer capability: %s (%d)\n", + prefix, ie2str(full_ie), len, (ie->data[0] & 0x80 ) >> 7, + (ie->data[0] & 0x60) >> 5, cap2str(ie->data[0] & 0x1f), + (ie->data[0] & 0x1f)); pri_message(ctrl, "%c Ext: %d Trans mode/rate: %s (%d)\n", prefix, (ie->data[1] & 0x80) >> 7, mode2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f); - /* octet 4.1 exists iff mode/rate is multirate */ + /* octet 4.1 exists if mode/rate is multirate */ if ((ie->data[1] & 0x7f) == 0x18) { - pri_message(ctrl, "%c Ext: %d Transfer rate multiplier: %d x 64\n", prefix, (ie->data[2] & 0x80) >> 7, ie->data[2] & 0x7f); + pri_message(ctrl, "%c Ext: %d Transfer rate multiplier: %d x 64\n", prefix, (ie->data[2] & 0x80) >> 7, ie->data[2] & 0x7f); pos++; } @@ -1690,7 +1846,7 @@ call->bc.transcapability = ie->data[0] & 0x1f; call->bc.transmoderate = ie->data[1] & 0x7f; - /* octet 4.1 exists iff mode/rate is multirate */ + /* octet 4.1 exists if mode/rate is multirate */ if (call->bc.transmoderate == TRANS_MODE_MULTIRATE) { call->bc.transmultiple = ie->data[pos++] & 0x7f; } @@ -1770,10 +1926,10 @@ ie->data[0] = 0x80 | tc; ie->data[1] = call->bc.transmoderate | 0x80; - pos = 2; - /* octet 4.1 exists iff mode/rate is multirate */ - if (call->bc.transmoderate == TRANS_MODE_MULTIRATE ) { - ie->data[pos++] = call->bc.transmultiple | 0x80; + pos = 2; + /* octet 4.1 exists if mode/rate is multirate */ + if (call->bc.transmoderate == TRANS_MODE_MULTIRATE) { + ie->data[pos++] = call->bc.transmultiple | 0x80; } if ((tc & PRI_TRANS_CAP_DIGITAL) && (ctrl->switchtype == PRI_SWITCH_EUROISDN_E1) && @@ -1891,27 +2047,29 @@ char *pri_pres2str(int pres) { static struct msgtype press[] = { - { PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, "Presentation permitted, user number not screened" }, - { PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, "Presentation permitted, user number passed network screening" }, - { PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN, "Presentation permitted, user number failed network screening" }, - { PRES_ALLOWED_NETWORK_NUMBER, "Presentation allowed of network provided number" }, - { PRES_PROHIB_USER_NUMBER_NOT_SCREENED, "Presentation prohibited, user number not screened" }, - { PRES_PROHIB_USER_NUMBER_PASSED_SCREEN, "Presentation prohibited, user number passed network screening" }, - { PRES_PROHIB_USER_NUMBER_FAILED_SCREEN, "Presentation prohibited, user number failed network screening" }, - { PRES_PROHIB_NETWORK_NUMBER, "Presentation prohibited of network provided number" }, - { PRES_NUMBER_NOT_AVAILABLE, "Number not available" }, + { PRI_PRES_ALLOWED | PRI_PRES_USER_NUMBER_UNSCREENED, "Presentation allowed, User-provided, not screened" }, + { PRI_PRES_ALLOWED | PRI_PRES_USER_NUMBER_PASSED_SCREEN, "Presentation allowed, User-provided, verified and passed" }, + { PRI_PRES_ALLOWED | PRI_PRES_USER_NUMBER_FAILED_SCREEN, "Presentation allowed, User-provided, verified and failed" }, + { PRI_PRES_ALLOWED | PRI_PRES_NETWORK_NUMBER, "Presentation allowed, Network provided" }, + + { PRI_PRES_RESTRICTED | PRI_PRES_USER_NUMBER_UNSCREENED, "Presentation restricted, User-provided, not screened" }, + { PRI_PRES_RESTRICTED | PRI_PRES_USER_NUMBER_PASSED_SCREEN, "Presentation restricted, User-provided, verified and passed" }, + { PRI_PRES_RESTRICTED | PRI_PRES_USER_NUMBER_FAILED_SCREEN, "Presentation restricted, User-provided, verified and failed" }, + { PRI_PRES_RESTRICTED | PRI_PRES_NETWORK_NUMBER, "Presentation restricted, Network provided" }, + + { PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_UNSCREENED, "Number not available, User-provided, not screened" }, + { PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_PASSED_SCREEN, "Number not available, User-provided, verified and passed" }, + { PRI_PRES_UNAVAILABLE | PRI_PRES_USER_NUMBER_FAILED_SCREEN, "Number not available, User-provided, verified and failed" }, + { PRI_PRES_UNAVAILABLE | PRI_PRES_NETWORK_NUMBER, "Number not available, Network provided" }, + + { PRI_PRES_RESERVED | PRI_PRES_USER_NUMBER_UNSCREENED, "Reserved, User-provided, not screened" }, + { PRI_PRES_RESERVED | PRI_PRES_USER_NUMBER_PASSED_SCREEN, "Reserved, User-provided, verified and passed" }, + { PRI_PRES_RESERVED | PRI_PRES_USER_NUMBER_FAILED_SCREEN, "Reserved, User-provided, verified and failed" }, + { PRI_PRES_RESERVED | PRI_PRES_NETWORK_NUMBER, "Reserved, Network provided" }, }; - return code2str(pres, press, sizeof(press) / sizeof(press[0])); -} -static void q931_get_number(unsigned char *num, int maxlen, unsigned char *src, int len) -{ - if ((len < 0) || (len > maxlen - 1)) { - num[0] = 0; - return; - } - memcpy(num, src, len); - num[len] = 0; + pres &= (PRI_PRES_RESTRICTION | PRI_PRES_NUMBER_TYPE); + return code2str(pres, press, sizeof(press) / sizeof(press[0])); } static void q931_get_subaddr_specific(unsigned char *num, int maxlen, unsigned char *src, int len, char oddflag) @@ -1975,19 +2133,19 @@ /* type: 0 = NSAP, 2 = User Specified */ q931_subaddress->type = ((ie->data[0] & 0x70) >> 4); q931_subaddress->odd_even_indicator = (ie->data[0] & 0x08) ? 1 : 0; - q931_get_number(q931_subaddress->data, sizeof(q931_subaddress->data), + q931_memget(q931_subaddress->data, sizeof(q931_subaddress->data), ie->data + offset, len); return 0; } -static void dump_subaddr_helper(int full_ie, struct pri *ctrl, q931_ie *ie, int offset, int len, int datalen, char prefix, const char *named) +static void dump_subaddr_helper(int full_ie, struct pri *ctrl, q931_ie *ie, int offset, int len, int datalen, char prefix) { unsigned char cnum[256]; if (!(ie->data[0] & 0x70)) { - /* NSAP */ - q931_get_number(cnum, sizeof(cnum), ie->data + offset, datalen); + /* NSAP Get it as a string for dump display purposes only. */ + q931_strget(cnum, sizeof(cnum), ie->data + offset, datalen); } else { /* User Specified */ q931_get_subaddr_specific(cnum, sizeof(cnum), ie->data + offset, datalen, @@ -1995,8 +2153,8 @@ } pri_message(ctrl, - "%c %s Sub-Address (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n", - prefix, named, len, ie->data[0] >> 7, + "%c %s (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, subaddrtype2str((ie->data[0] & 0x70) >> 4), (ie->data[0] & 0x70) >> 4, (ie->data[0] & 0x08) >> 3, cnum); } @@ -2005,39 +2163,50 @@ { unsigned char cnum[256]; - q931_get_number(cnum, sizeof(cnum), ie->data + 1, len - 3); - pri_message(ctrl, "%c Called Number (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d) '%s' ]\n", - prefix, len, ie->data[0] >> 7, ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f, cnum); + q931_strget(cnum, sizeof(cnum), ie->data + 1, len - 3); + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d) '%s' ]\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, + npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f, cnum); } static void dump_called_party_subaddr(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - dump_subaddr_helper(full_ie, ctrl, ie, 1 , len, len - 3, prefix, "Called"); + dump_subaddr_helper(full_ie, ctrl, ie, 1, len, len - 3, prefix); } static void dump_calling_party_number(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { unsigned char cnum[256]; - if (ie->data[0] & 0x80) - q931_get_number(cnum, sizeof(cnum), ie->data + 1, len - 3); - else - q931_get_number(cnum, sizeof(cnum), ie->data + 2, len - 4); - pri_message(ctrl, "%c Calling Number (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d)\n", prefix, len, ie->data[0] >> 7, ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f); - if (ie->data[0] & 0x80) - pri_message(ctrl, "%c Presentation: %s (%d) '%s' ]\n", prefix, pri_pres2str(0), 0, cnum); - else - pri_message(ctrl, "%c Presentation: %s (%d) '%s' ]\n", prefix, pri_pres2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f, cnum); + + if (ie->data[0] & 0x80) { + q931_strget(cnum, sizeof(cnum), ie->data + 1, len - 3); + } else { + q931_strget(cnum, sizeof(cnum), ie->data + 2, len - 4); + } + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d)\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, + npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f); + if (ie->data[0] & 0x80) { + pri_message(ctrl, "%c Presentation: %s (%d) '%s' ]\n", + prefix, pri_pres2str(0), 0, cnum); + } else { + pri_message(ctrl, "%c Presentation: %s (%d) '%s' ]\n", + prefix, pri_pres2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f, cnum); + } } static void dump_calling_party_subaddr(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - dump_subaddr_helper(full_ie, ctrl, ie, 1 , len, len - 3, prefix, "Calling"); + dump_subaddr_helper(full_ie, ctrl, ie, 1, len, len - 3, prefix); } static void dump_calling_party_category(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Calling Party Category (len=%2d) [ Ext: %d Cat: %s (%d) ]\n", - prefix, len, ie->data[0] >> 7, cpc2str(ie->data[0] & 0x0F), ie->data[0] & 0x0F); + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d Cat: %s (%d) ]\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + cpc2str(ie->data[0] & 0x0F), ie->data[0] & 0x0F); } static void dump_redirecting_number(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) @@ -2049,8 +2218,10 @@ do { switch(i) { case 0: /* Octet 3 */ - pri_message(ctrl, "%c Redirecting Number (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d)", - prefix, len, ie->data[0] >> 7, ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f); + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d)", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, + npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f); break; case 1: /* Octet 3a */ pri_message(ctrl, "\n"); @@ -2063,8 +2234,8 @@ prefix, ie->data[2] >> 7, redirection_reason2str(ie->data[2] & 0x7f), ie->data[2] & 0x7f); break; } - } while(!(ie->data[i++]& 0x80)); - q931_get_number(cnum, sizeof(cnum), ie->data + i, ie->len - i); + } while (!(ie->data[i++] & 0x80)); + q931_strget(cnum, sizeof(cnum), ie->data + i, ie->len - i); pri_message(ctrl, " '%s' ]\n", cnum); } @@ -2077,9 +2248,8 @@ do { switch (i) { case 0: /* Octet 3 */ - pri_message(ctrl, - "%c Redirection Number (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d)", - prefix, len, ie->data[0] >> 7, + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d)", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, ton2str((ie->data[0] >> 4) & 0x07), (ie->data[0] >> 4) & 0x07, npi2str(ie->data[0] & 0x0f), ie->data[0] & 0x0f); break; @@ -2090,7 +2260,7 @@ break; } } while (!(ie->data[i++] & 0x80)); - q931_get_number(cnum, sizeof(cnum), ie->data + i, ie->len - i); + q931_strget(cnum, sizeof(cnum), ie->data + i, ie->len - i); pri_message(ctrl, " '%s' ]\n", cnum); } @@ -2116,7 +2286,8 @@ break; } } while (!(ie->data[i++] & 0x80)); - q931_get_number((unsigned char *) call->remote_id.number.str, sizeof(call->remote_id.number.str), ie->data + i, ie->len - i); + q931_strget_gripe(ctrl, ie2str(full_ie), (unsigned char *) call->remote_id.number.str, + sizeof(call->remote_id.number.str), ie->data + i, ie->len - i); return 0; } @@ -2157,7 +2328,7 @@ break; } } while(!(ie->data[i++]& 0x80)); - q931_get_number(cnum, sizeof(cnum), ie->data + i, ie->len - i); + q931_strget(cnum, sizeof(cnum), ie->data + i, ie->len - i); pri_message(ctrl, " '%s' ]\n", cnum); } @@ -2179,7 +2350,7 @@ static void dump_connected_subaddr(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - dump_subaddr_helper(full_ie, ctrl, ie, 1 , len, len - 3, prefix, "Connected"); + dump_subaddr_helper(full_ie, ctrl, ie, 1, len, len - 3, prefix); } static int receive_redirecting_number(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -2208,7 +2379,9 @@ break; } } while (!(ie->data[i++] & 0x80)); - q931_get_number((unsigned char *) call->redirecting.from.number.str, sizeof(call->redirecting.from.number.str), ie->data + i, ie->len - i); + q931_strget_gripe(ctrl, ie2str(full_ie), + (unsigned char *) call->redirecting.from.number.str, + sizeof(call->redirecting.from.number.str), ie->data + i, ie->len - i); return 0; } @@ -2255,7 +2428,7 @@ static void dump_redirecting_subaddr(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - dump_subaddr_helper(full_ie, ctrl, ie, 2, len, len - 4, prefix, "Redirecting"); + dump_subaddr_helper(full_ie, ctrl, ie, 2, len, len - 4, prefix); } static int receive_redirection_number(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -2279,7 +2452,9 @@ break; } } while (!(ie->data[i++] & 0x80)); - q931_get_number((unsigned char *) call->redirection_number.str, sizeof(call->redirection_number.str), ie->data + i, ie->len - i); + q931_strget_gripe(ctrl, ie2str(full_ie), + (unsigned char *) call->redirection_number.str, + sizeof(call->redirection_number.str), ie->data + i, ie->len - i); return 0; } @@ -2352,7 +2527,7 @@ case Q931_REGISTER: /* Accept the number for REGISTER only because it is so similar to SETUP. */ case Q931_SETUP: - q931_get_number((unsigned char *) call->called.number.str, + q931_strget((unsigned char *) call->called.number.str, sizeof(call->called.number.str), ie->data + 1, len - 3); break; case Q931_INFORMATION: @@ -2379,8 +2554,8 @@ call->called.number.valid = 1; call->called.number.plan = ie->data[0] & 0x7f; - q931_get_number((unsigned char *) call->overlap_digits, sizeof(call->overlap_digits), - ie->data + 1, len - 3); + q931_strget_gripe(ctrl, ie2str(full_ie), (unsigned char *) call->overlap_digits, + sizeof(call->overlap_digits), ie->data + 1, len - 3); return 0; } @@ -2421,8 +2596,8 @@ break; } } while (!(ie->data[i++] & 0x80)); - q931_get_number((unsigned char *) number.str, sizeof(number.str), ie->data + i, - ie->len - i); + q931_strget_gripe(ctrl, ie2str(full_ie), (unsigned char *) number.str, + sizeof(number.str), ie->data + i, ie->len - i); /* There can be more than one calling party number ie in the SETUP message. */ if (number.presentation == (PRI_PRES_ALLOWED | PRI_PRES_NETWORK_NUMBER) @@ -2458,18 +2633,21 @@ static void dump_user_user(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { int x; - pri_message(ctrl, "%c User-User Information (len=%2d) [", prefix, len); - for (x=0;x<ie->len;x++) + + pri_message(ctrl, "%c %s (len=%2d) [", prefix, ie2str(full_ie), len); + for (x = 0; x < ie->len; ++x) { pri_message(ctrl, " %02x", ie->data[x] & 0x7f); + } pri_message(ctrl, " ]\n"); } static int receive_user_user(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) -{ - call->useruserprotocoldisc = ie->data[0] & 0xff; - if (call->useruserprotocoldisc == 4) /* IA5 */ - q931_get_number((unsigned char *) call->useruserinfo, sizeof(call->useruserinfo), ie->data + 1, len - 3); +{ + call->useruserprotocoldisc = ie->data[0] & 0xff; + if (call->useruserprotocoldisc == 4) { /* IA5 */ + q931_memget((unsigned char *) call->useruserinfo, sizeof(call->useruserinfo), ie->data + 1, len - 3); + } return 0; } @@ -2497,9 +2675,9 @@ static void dump_change_status(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { int x; - - pri_message(ctrl, "%c Change Status Information (len=%2d) [", prefix, len); - for (x=0; x<ie->len; x++) { + + pri_message(ctrl, "%c %s (len=%2d) [", prefix, ie2str(full_ie), len); + for (x = 0; x < ie->len; ++x) { pri_message(ctrl, " %02x", ie->data[x] & 0x7f); } pri_message(ctrl, " ]\n"); @@ -2561,8 +2739,10 @@ static void dump_progress_indicator(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Progress Indicator (len=%2d) [ Ext: %d Coding: %s (%d) 0: %d Location: %s (%d)\n", - prefix, len, ie->data[0] >> 7, coding2str((ie->data[0] & 0x60) >> 5), (ie->data[0] & 0x60) >> 5, + pri_message(ctrl, + "%c %s (len=%2d) [ Ext: %d Coding: %s (%d) 0: %d Location: %s (%d)\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + coding2str((ie->data[0] & 0x60) >> 5), (ie->data[0] & 0x60) >> 5, (ie->data[0] & 0x10) >> 4, loc2str(ie->data[0] & 0xf), ie->data[0] & 0xf); pri_message(ctrl, "%c Ext: %d Progress Description: %s (%d) ]\n", prefix, ie->data[1] >> 7, prog2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f); @@ -2583,7 +2763,8 @@ len--; } - call->display.text = (char *) data; + call->display.text = data; + call->display.full_ie = full_ie; call->display.length = len - 2; call->display.char_set = PRI_CHAR_SET_ISO8859_1; return 0; @@ -3040,23 +3221,26 @@ static void dump_call_state(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Call State (len=%2d) [ Ext: %d Coding: %s (%d) Call state: %s (%d)\n", - prefix, len, ie->data[0] >> 7, coding2str((ie->data[0] & 0xC0) >> 6), (ie->data[0] & 0xC0) >> 6, + pri_message(ctrl, "%c %s (len=%2d) [ Ext: %d Coding: %s (%d) Call state: %s (%d)\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + coding2str((ie->data[0] & 0xC0) >> 6), (ie->data[0] & 0xC0) >> 6, q931_call_state_str(ie->data[0] & 0x3f), ie->data[0] & 0x3f); } static void dump_call_identity(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { int x; - pri_message(ctrl, "%c Call Identity (len=%2d) [ ", prefix, len); - for (x=0;x<ie->len;x++) + + pri_message(ctrl, "%c %s (len=%2d) [ ", prefix, ie2str(full_ie), len); + for (x = 0; x < ie->len; ++x) { pri_message(ctrl, "0x%02X ", ie->data[x]); + } pri_message(ctrl, " ]\n"); } static void dump_time_date(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Time Date (len=%2d) [ ", prefix, len); + pri_message(ctrl, "%c %s (len=%2d) [ ", prefix, ie2str(full_ie), len); if (ie->len > 0) pri_message(ctrl, "%02d", ie->data[0]); if (ie->len > 1) @@ -3124,30 +3308,19 @@ static void dump_keypad_facility(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - char tmp[64]; - - if (ie->len == 0 || ie->len > sizeof(tmp)) - return; - - memcpy(tmp, ie->data, ie->len); - tmp[ie->len] = '\0'; - pri_message(ctrl, "%c Keypad Facility (len=%2d) [ %s ]\n", prefix, ie->len, tmp ); + unsigned char tmp[64]; + + q931_strget(tmp, sizeof(tmp), ie->data, ie->len); + pri_message(ctrl, "%c %s (len=%2d) [ %s ]\n", prefix, ie2str(full_ie), ie->len, tmp); } static int receive_keypad_facility(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) { - int mylen; - if (ie->len == 0) return -1; - if (ie->len > (sizeof(call->keypad_digits) - 1)) - mylen = (sizeof(call->keypad_digits) - 1); - else - mylen = ie->len; - - memcpy(call->keypad_digits, ie->data, mylen); - call->keypad_digits[mylen] = 0; + q931_strget_gripe(ctrl, ie2str(full_ie), (unsigned char *) call->keypad_digits, + sizeof(call->keypad_digits), ie->data, ie->len); return 0; } @@ -3166,21 +3339,20 @@ static void dump_display(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - int x, y; - char *buf = malloc(len + 1); - char tmp[80] = ""; - if (buf) { - x=y=0; - if ((x < ie->len) && (ie->data[x] & 0x80)) { - sprintf(tmp, "Charset: %02x ", ie->data[x] & 0x7f); - ++x; - } - for (y=x; x<ie->len; x++) - buf[x] = ie->data[x] & 0x7f; - buf[x] = '\0'; - pri_message(ctrl, "%c Display (len=%2d) %s[ %s ]\n", prefix, ie->len, tmp, &buf[y]); - free(buf); - } + int x; + unsigned char buf[2*80 + 1]; + char tmp[20 + 1]; + + x = 0; + if (ie->len && (ie->data[x] & 0x80)) { + snprintf(tmp, sizeof(tmp), "Charset: %02x ", ie->data[x] & 0x7f); + ++x; + } else { + tmp[0] = '\0'; + } + q931_strget(buf, sizeof(buf), &ie->data[x], ie->len - x); + pri_message(ctrl, "%c %s (len=%2d) %s[ %s ]\n", + prefix, ie2str(full_ie), ie->len, tmp, buf); } #define CHECK_OVERFLOW(limit) \ @@ -3230,7 +3402,8 @@ static void dump_facility(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Facility (len=%2d, codeset=%d) [ ", prefix, len, Q931_IE_CODESET(full_ie)); + pri_message(ctrl, "%c %s (len=%2d, codeset=%d) [ ", + prefix, ie2str(full_ie), len, Q931_IE_CODESET(full_ie)); dump_ie_data(ctrl, ie->data, ie->len); pri_message(ctrl, " ]\n"); #if 0 /* Lets not dump parse of facility contents here anymore. */ @@ -3250,12 +3423,12 @@ static void dump_network_spec_fac(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Network-Specific Facilities (len=%2d) [ ", prefix, ie->len); + pri_message(ctrl, "%c %s (len=%2d) [ ", prefix, ie2str(full_ie), ie->len); if (ie->data[0] == 0x00) { - pri_message(ctrl, "%s", code2str(ie->data[1], facilities, ARRAY_LEN(facilities))); + pri_message(ctrl, "%s", code2str(ie->data[1], facilities, ARRAY_LEN(facilities))); + } else { + dump_ie_data(ctrl, ie->data, ie->len); } - else - dump_ie_data(ctrl, ie->data, ie->len); pri_message(ctrl, " ]\n"); } @@ -3302,12 +3475,14 @@ static void dump_cause(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { int x; - pri_message(ctrl, "%c Cause (len=%2d) [ Ext: %d Coding: %s (%d) Spare: %d Location: %s (%d)\n", - prefix, len, ie->data[0] >> 7, coding2str((ie->data[0] & 0x60) >> 5), (ie->data[0] & 0x60) >> 5, + pri_message(ctrl, + "%c %s (len=%2d) [ Ext: %d Coding: %s (%d) Spare: %d Location: %s (%d)\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + coding2str((ie->data[0] & 0x60) >> 5), (ie->data[0] & 0x60) >> 5, (ie->data[0] & 0x10) >> 4, loc2str(ie->data[0] & 0xf), ie->data[0] & 0xf); pri_message(ctrl, "%c Ext: %d Cause: %s (%d), class = %s (%d) ]\n", - prefix, (ie->data[1] >> 7), pri_cause2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f, - pri_causeclass2str((ie->data[1] & 0x7f) >> 4), (ie->data[1] & 0x7f) >> 4); + prefix, (ie->data[1] >> 7), pri_cause2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f, + pri_causeclass2str((ie->data[1] & 0x7f) >> 4), (ie->data[1] & 0x7f) >> 4); if (ie->len < 3) return; /* Dump cause data in readable form */ @@ -3362,7 +3537,7 @@ static void dump_sending_complete(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Sending Complete (len=%2d)\n", prefix, len); + pri_message(ctrl, "%c %s (len=%2d)\n", prefix, ie2str(full_ie), len); } static int receive_sending_complete(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -3415,7 +3590,9 @@ static void dump_notify(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Notification indicator (len=%2d): Ext: %d %s (%d)\n", prefix, len, ie->data[0] >> 7, notify2str(ie->data[0] & 0x7f), ie->data[0] & 0x7f); + pri_message(ctrl, "%c %s (len=%2d): Ext: %d %s (%d)\n", + prefix, ie2str(full_ie), len, ie->data[0] >> 7, + notify2str(ie->data[0] & 0x7f), ie->data[0] & 0x7f); } static int receive_notify(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -3435,7 +3612,8 @@ static void dump_shift(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c %sLocking Shift (len=%02d): Requested codeset %d\n", prefix, (full_ie & 8) ? "Non-" : "", len, full_ie & 7); + pri_message(ctrl, "%c %sLocking Shift (len=%02d): Requested codeset %d\n", + prefix, (full_ie & 8) ? "Non-" : "", len, full_ie & 7); } static char *lineinfo2str(int info) @@ -3472,7 +3650,8 @@ static void dump_line_information(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Originating Line Information (len=%02d): %s (%d)\n", prefix, len, lineinfo2str(ie->data[0]), ie->data[0]); + pri_message(ctrl, "%c %s (len=%02d): %s (%d)\n", + prefix, ie2str(full_ie), len, lineinfo2str(ie->data[0]), ie->data[0]); } static int receive_line_information(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -3527,12 +3706,14 @@ int idx; int value; if (len < 3) { - pri_message(ctrl, "%c Generic Digits (len=%02d): Invalid length\n", prefix, len); + pri_message(ctrl, "%c %s (len=%02d): Invalid length\n", + prefix, ie2str(full_ie), len); return; } encoding = (ie->data[0] >> 5) & 7; type = ie->data[0] & 0x1F; - pri_message(ctrl, "%c Generic Digits (len=%02d): Encoding %s Type %s\n", prefix, len, gdencoding2str(encoding), gdtype2str(type)); + pri_message(ctrl, "%c %s (len=%02d): Encoding %s Type %s\n", + prefix, ie2str(full_ie), len, gdencoding2str(encoding), gdtype2str(type)); if (encoding == 3) { /* Binary */ pri_message(ctrl, "%c Don't know how to handle binary encoding\n", prefix); @@ -3692,7 +3873,7 @@ static void dump_signal(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Signal (len=%02d): ", prefix, len); + pri_message(ctrl, "%c %s (len=%02d): ", prefix, ie2str(full_ie), len); if (len < 3) { pri_message(ctrl, "Invalid length\n"); return; @@ -3703,7 +3884,7 @@ static void dump_transit_count(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { /* Defined in ECMA-225 */ - pri_message(ctrl, "%c Transit Count (len=%02d): ", prefix, len); + pri_message(ctrl, "%c %s (len=%02d): ", prefix, ie2str(full_ie), len); if (len < 3) { pri_message(ctrl, "Invalid length\n"); return; @@ -3713,7 +3894,7 @@ static void dump_reverse_charging_indication(int full_ie, struct pri *ctrl, q931_ie *ie, int len, char prefix) { - pri_message(ctrl, "%c Reverse Charging Indication (len=%02d): %d\n", prefix, len, ie->data[0] & 0x7); + pri_message(ctrl, "%c %s (len=%02d): %d\n", prefix, ie2str(full_ie), len, ie->data[0] & 0x7); } static int receive_reverse_charging_indication(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len) @@ -3733,12 +3914,12 @@ static struct ie ies[] = { /* Codeset 0 - Common */ - { 1, NATIONAL_CHANGE_STATUS, "Change Status", dump_change_status, receive_change_status, transmit_change_status }, + { 1, NATIONAL_CHANGE_STATUS, "Change Status Information", dump_change_status, receive_change_status, transmit_change_status }, { 0, Q931_LOCKING_SHIFT, "Locking Shift", dump_shift }, { 0, Q931_BEARER_CAPABILITY, "Bearer Capability", dump_bearer_capability, receive_bearer_capability, transmit_bearer_capability }, { 0, Q931_CAUSE, "Cause", dump_cause, receive_cause, transmit_cause }, { 1, Q931_IE_CALL_STATE, "Call State", dump_call_state, receive_call_state, transmit_call_state }, - { 0, Q931_CHANNEL_IDENT, "Channel Identification", dump_channel_id, receive_channel_id, transmit_channel_id }, + { 0, Q931_CHANNEL_IDENT, "Channel ID", dump_channel_id, receive_channel_id, transmit_channel_id }, { 0, Q931_PROGRESS_INDICATOR, "Progress Indicator", dump_progress_indicator, receive_progress_indicator, transmit_progress_indicator }, { 0, Q931_NETWORK_SPEC_FAC, "Network-Specific Facilities", dump_network_spec_fac, receive_network_spec_fac, transmit_network_spec_fac }, { 1, Q931_INFORMATION_RATE, "Information Rate" }, @@ -3774,10 +3955,10 @@ { 1, Q931_IE_KEYPAD_FACILITY, "Keypad Facility", dump_keypad_facility, receive_keypad_facility, transmit_keypad_facility }, { 0, Q931_IE_SIGNAL, "Signal", dump_signal }, { 1, Q931_IE_SWITCHHOOK, "Switch-hook" }, - { 1, Q931_IE_USER_USER, "User-User", dump_user_user, receive_user_user, transmit_user_user }, + { 1, Q931_IE_USER_USER, "User-User Information", dump_user_user, receive_user_user, transmit_user_user }, { 1, Q931_IE_ESCAPE_FOR_EXT, "Escape for Extension" }, { 1, Q931_IE_CALL_STATUS, "Call Status" }, - { 1, Q931_IE_CHANGE_STATUS, "Change Status", dump_change_status, receive_change_status, transmit_change_status }, + { 1, Q931_IE_CHANGE_STATUS, "Change Status Information", dump_change_status, receive_change_status, transmit_change_status }, { 1, Q931_IE_CONNECTED_ADDR, "Connected Address", dump_connected_number, receive_connected_number, transmit_connected_number }, { 1, Q931_IE_CONNECTED_NUM, "Connected Number", dump_connected_number, receive_connected_number, transmit_connected_number }, { 1, Q931_IE_CONNECTED_SUBADDR, "Connected Subaddress", dump_connected_subaddr, receive_connected_subaddr, transmit_connected_subaddr }, @@ -4240,6 +4421,8 @@ struct pri *ctrl; ctrl = cur->pri; + pri_schedule_del(ctrl, cur->restart.timer); + pri_schedule_del(ctrl, cur->restart_tx.t316_timer); pri_schedule_del(ctrl, cur->retranstimer); pri_schedule_del(ctrl, cur->hold_timer); pri_schedule_del(ctrl, cur->fake_clearing_timer); @@ -5070,7 +5253,8 @@ case Q931_CALL_STATE_INCOMING_CALL_PROCEEDING: case Q931_CALL_STATE_ACTIVE: case Q931_CALL_STATE_OVERLAP_RECEIVING: - call->display.text = display->text; + call->display.text = (unsigned char *) display->text; + call->display.full_ie = 0; call->display.length = display->length; call->display.char_set = display->char_set; status = send_message(ctrl, call, Q931_INFORMATION, information_display_ies); @@ -5730,6 +5914,81 @@ static int restart_ies[] = { Q931_CHANNEL_IDENT, Q931_RESTART_INDICATOR, -1 }; +static void t316_expire(void *vcall); + +/*! + * \internal + * \brief Send the RESTART message to the peer. + * + * \param call Q.931 call leg + * \param channel Encoded channel id to use. + * + * \retval 0 on success. + * \retval -1 on error. + */ +static int q931_send_restart(struct q931_call *call) +{ + struct pri *ctrl = call->pri; + int channel = call->restart_tx.channel; + + /* Start timer T316 if enabled. */ + if (0 < ctrl->timers[PRI_TIMER_T316]) { + call->restart_tx.t316_timer = + pri_schedule_event(ctrl, ctrl->timers[PRI_TIMER_T316], t316_expire, call); + --call->restart_tx.remain; + } + + call->ri = 0; + call->ds1no = (channel >> 8) & 0xFF; + call->ds1explicit = (channel >> 16) & 0x1; + call->channelno = channel & 0xFF; + call->chanflags &= ~FLAG_PREFERRED; + call->chanflags |= FLAG_EXCLUSIVE; + UPDATE_OURCALLSTATE(ctrl, call, Q931_CALL_STATE_RESTART); + call->peercallstate = Q931_CALL_STATE_RESTART_REQUEST; + return send_message(ctrl, call, Q931_RESTART, restart_ies); +} + +/*! + * \internal + * \brief T316 expired. + * + * \param vcall Q.931 call leg + * + * \return Nothing + */ +static void t316_expire(void *vcall) +{ + struct q931_call *call = vcall; + + call->restart_tx.t316_timer = 0; + + if (call->restart_tx.remain) { + /* Retransmit the RESTART */ + q931_send_restart(call); + } else { + int channel = call->restart_tx.channel; + + pri_message(call->pri, + "!! Peer failed to ack our RESTART request for ds1/channel:%d/%d.\n", + (channel >> 8) & 0xFF, channel & 0xFF); + } +} + +/*! + * \internal + * \brief Stop timer T316. + * + * \param call Q.931 call leg + * + * \return Nothing + */ +static void stop_t316(struct q931_call *call) +{ + pri_schedule_del(call->pri, call->restart_tx.t316_timer); + call->restart_tx.t316_timer = 0; +} + /*! * \brief Send the RESTART message to the peer. * @@ -5747,9 +6006,6 @@ * there might not be anything connected. The broadcast could * be handled in a similar manner to the broadcast SETUP. * - * \todo Need to implement T316 to protect against missing - * RESTART_ACKNOWLEDGE and STATUS messages. - * * \todo NT PTMP mode should implement some protection from * receiving a RESTART on channels in use by another TEI. * @@ -5758,22 +6014,21 @@ */ int q931_restart(struct pri *ctrl, int channel) { - struct q931_call *c; + struct q931_call *call; - c = q931_getcall(&ctrl->link, 0 | Q931_CALL_REFERENCE_FLAG); - if (!c) + if (!channel) { return -1; - if (!channel) + } + call = q931_getcall(&ctrl->link, 0 | Q931_CALL_REFERENCE_FLAG); + if (!call) { return -1; - c->ri = 0; - c->ds1no = (channel & 0xff00) >> 8; - c->ds1explicit = (channel & 0x10000) >> 16; - c->channelno = channel & 0xff; - c->chanflags &= ~FLAG_PREFERRED; - c->chanflags |= FLAG_EXCLUSIVE; - UPDATE_OURCALLSTATE(ctrl, c, Q931_CALL_STATE_RESTART); - c->peercallstate = Q931_CALL_STATE_RESTART_REQUEST; - return send_message(ctrl, c, Q931_RESTART, restart_ies); + } + + stop_t316(call); + call->restart_tx.remain = (0 < ctrl->timers[PRI_TIMER_N316]) + ? ctrl->timers[PRI_TIMER_N316] : 1; + call->restart_tx.channel = channel; + return q931_send_restart(call); } static int disconnect_ies[] = { Q931_CAUSE, Q931_IE_FACILITY, Q931_IE_USER_USER, -1 }; @@ -6705,7 +6960,7 @@ case Q931_CALL_STATE_RESTART_REQUEST: case Q931_CALL_STATE_RESTART: pri_error(ctrl, - "Wierd, doing nothing but this shouldn't happen, ourstate %s, peerstate %s\n", + "Weird, doing nothing but this shouldn't happen, ourstate %s, peerstate %s\n", q931_call_state_str(c->ourcallstate), q931_call_state_str(c->peercallstate)); break; @@ -8194,6 +8449,60 @@ /*! * \internal + * \brief Restart channel notify event for upper layer notify chain timeout. + * + * \param data Callback data pointer. + * + * \return Nothing + */ +static void q931_restart_notify_timeout(void *data) +{ + struct q931_call *call = data; + struct pri *ctrl = call->pri; + + /* Create channel restart event to upper layer. */ + call->channelno = call->restart.chan_no[call->restart.idx++]; + ctrl->ev.e = PRI_EVENT_RESTART; + ctrl->ev.restart.channel = q931_encode_channel(call); + ctrl->schedev = 1; + + /* Reschedule for next channel restart event needed. */ + if (call->restart.idx < call->restart.count) { + call->restart.timer = pri_schedule_event(ctrl, 0, q931_restart_notify_timeout, + call); + } else { + /* No more restart events needed. */ + call->restart.timer = 0; + + /* Send back the Restart Acknowledge. All channels are now restarted. */ + if (call->slotmap != -1) { + /* Send slotmap format. */ + call->channelno = -1; + } + restart_ack(ctrl, call); + } +} + +/*! + * \internal + * \brief Setup restart channel notify events for upper layer. + * + * \param call Q.931 call leg. + * + * \return Nothing + */ +static void q931_restart_notify(struct q931_call *call) +{ + struct pri *ctrl = call->pri; + + /* Start notify chain. */ + pri_schedule_del(ctrl, call->restart.timer); + call->restart.idx = 0; + q931_restart_notify_timeout(call); +} + +/*! + * \internal * \brief Process the decoded information in the Q.931 message. * * \param ctrl D channel controller. @@ -8227,11 +8536,24 @@ } UPDATE_OURCALLSTATE(ctrl, c, Q931_CALL_STATE_RESTART); c->peercallstate = Q931_CALL_STATE_RESTART_REQUEST; - /* Send back the Restart Acknowledge */ - restart_ack(ctrl, c); - /* Notify user of restart event */ - ctrl->ev.e = PRI_EVENT_RESTART; - ctrl->ev.restart.channel = q931_encode_channel(c); + + /* Notify upper layer of restart event */ + if ((c->channelno == -1 && c->slotmap == -1) || !c->restart.count) { + /* + * Whole link restart or channel not identified by Channel ID ie + * 3.3 octets. + * + * Send back the Restart Acknowledge + */ + restart_ack(ctrl, c); + + /* Create channel restart event to upper layer. */ + ctrl->ev.e = PRI_EVENT_RESTART; + ctrl->ev.restart.channel = q931_encode_channel(c); + } else { + /* Start notify chain. */ + q931_restart_notify(c); + } return Q931_RES_HAVEEVENT; case Q931_REGISTER: q931_display_subcmd(ctrl, c); @@ -8757,6 +9079,16 @@ c->peercallstate = Q931_CALL_STATE_NULL; ctrl->ev.e = PRI_EVENT_RESTART_ACK; ctrl->ev.restartack.channel = q931_encode_channel(c); + if (c->restart_tx.t316_timer + /* + * Since the DS1 value can vary, only check the channel number. + * We're only supposed to have one RESTART request outstanding + * at a time anyway. + */ + && (c->restart_tx.channel & 0xFF) == (ctrl->ev.restartack.channel & 0xFF)) { + /* This is the RESTART ACKNOWLEDGE we are expecting. */ + stop_t316(c); + } return Q931_RES_HAVEEVENT; case Q931_INFORMATION: /* XXX We're handling only INFORMATION messages that contain | ||
[-] [+] | Changed | libpri-1.4.13.tar.bz2/testprilib.c ^ |
@@ -48,13 +48,10 @@ #include <sys/time.h> #include <netinet/in.h> #include <sys/socket.h> -#include <zaptel/zaptel.h> -#ifndef SOLARIS -#include <zap.h> -#endif #include <pthread.h> #include <sys/select.h> #include "libpri.h" +#include "pri_q921.h" #include "pri_q931.h" #ifndef AF_LOCAL @@ -66,7 +63,7 @@ #define PRI_DEF_NODETYPE PRI_CPE #define PRI_DEF_SWITCHTYPE PRI_SWITCH_NI2 -static struct pri *first, *cur; +static struct pri *first; static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; @@ -159,9 +156,9 @@ *c = '\0'; c++; } - if (keeplast) + if (keeplast || !pri) printf("%s", s); - else if (cur == first) + else if (pri == first) printf("-1 %s", s); else printf("-2 %s", s); @@ -185,9 +182,9 @@ *c = '\0'; c++; } - if (keeplast) + if (keeplast || !pri) printf("%s", s); - else if (cur == first) + else if (pri == first) printf("=1 %s", s); else printf("=2 %s", s); @@ -207,7 +204,7 @@ /* Joint D-channel */ struct pri *pri = data; struct timeval *next, tv; - pri_event *e; + pri_event *e = NULL; fd_set fds; int res; for(;;) { @@ -228,7 +225,6 @@ FD_SET(pri_fd(pri), &fds); res = select(pri_fd(pri) + 1, &fds, NULL, NULL, next ? &tv : NULL); pthread_mutex_lock(&lock); - cur = pri; if (res < 0) { perror("select"); } else if (!res) { @@ -238,9 +234,9 @@ } if (e) { if (first == pri) { - event1(e->gen.pri, e); + event1(pri, e); } else { - event2(e->gen.pri, e); + event2(pri, e); } } pthread_mutex_unlock(&lock); |