This set of changes integrates SERVICE message support for the
'national' switchtype. The 'national' switchtype uses the 0x43
protocol discriminator. The 'national' SERVICE/SERVICE ACKNOWLEDGE
and AT&T SERVICE/SERVICE ACKNOWLEDGE message values are opposite
of each other. This is handled by first determining which
protocol discriminator is in use, then responding with the appropriate
SERVICE ACKNOWLEDGE value. AT&T SERVICE messages use the
0x3 protocol discriminator.
(closes issue #15803)
Reported by: dhubbard
Review: https://reviewboard.asterisk.org/r/347/
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1072 2fbb986a-6c06-0410-b554-c9c1f0a7f128
* Fixed pri_schedule_event() to return 0 on error instead of -1. Zero is
a safer value to return. Users would not think that a timer was
scheduled.
* Fixed potential for pri_schedule_del() to write out of bounds of
pri_sched[]. The out of bounds access could occur when
pri_schedule_event() returned -1.
* Made use all pri_sched[] entries. pri_sched[0] was previously unused.
* Removed some unneeded code and recursion since scheduling only runs on
master D channel structures.
* Added doxygen comments.
* Renamed struct pri *pri variables to struct pri *ctrl in this file.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1059 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Also make sure that service maintenance messages have the channel id
parameters reinitialized for each message since they are sent over the
global call reference.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1051 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Add Connected Line Presentation (COLP) support to chan_dahdi/libpri as an
addition to issue 8824. This is the libpri portion. COLP support is now
available for ETSI PTP, ETSI PTMP, and Q.SIG with this patch.
(closes issue #14068)
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/339/
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@982 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Added make variable LIBPRI_OPT to set optimization level. By default the
optimization level is now set to -O2.
(closes issue #12676)
Reported by: tzafrir
Patches:
libpri_opt.diff uploaded by tzafrir (license 46)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@976 2fbb986a-6c06-0410-b554-c9c1f0a7f128
* Created pri_snprintf() to prevent buffer overflow in pri_dump_info_str().
* Extracted timer name to timer number table from pri_timer2idx() so
pri_dump_info_str() can use it.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@921 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Add the ability to transmit a Reverse Charging Indication IE during a SETUP
message. In passing, re-work some of the receive logic to be forwards
compatible with new RCI values that may be added in the future. Also removed
the PRI_REVERSECHARGE_SUPPORT define that I added on the last commit since we
can just check for PRI_REVERSECHARGE_NONE or _REQUESTED on the Asterisk side to
determine support for this.
Special thanks to rmudgett who could have written this in half the time he spent
reviewing it, but instead talked me through it. Much appreciated!
(issue #13760)
Reported by: mrgabu
Review: https://reviewboard.asterisk.org/r/292/
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@907 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Both were exposed/introduced by the TBR4 compliance patch for bug #12861, in changing how retransmissions and in how
the transmission queue was maintained. TX-RX message flow and acknowledgement was severely restricted,
since the patch changed the behavior so that pending untransmitted frames would not actually be send until
the next RR was received in normal circumstances, or REJ when a reject frame was received. On busy links,
this can severly limit the amount of useful traffic that is sent, and can slow down message transmission.
Until someone can point out where in Q.921 it is mandated for us to wait for RR frames to start sending
untransmitted messages, the first change is to allow us to send untransmitted frames when we receive new
I frames as well, with updated N(R).
The other bug fixed is a situation caused by the restricted traffic flow, if an outside process tries to send
an I-frame asynchronous to an RR frame, when the transmit window was previously closed and then opened up but
an RR has not been received yet. A bug was found with the integration of the old transmit code with the new reject
handling code which caused the new frame to be sent immediately, regardless if there were any pending untransmitted
I-frames in the queue to be sent and causing an out of order I-frame to be sent to the other side. This bug is
also fixed in this patch.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@859 2fbb986a-6c06-0410-b554-c9c1f0a7f128
The context tagging for my editor is much happier now that the struct and the
variable do not have the same name. (At least for this file.)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@824 2fbb986a-6c06-0410-b554-c9c1f0a7f128
These API calls do not modify the string supplied, and should not be allowed to modify it, so this patch adds a 'const' qualifier to that argument to allow the compiler to enforce this restriction (and allow callers of the API that already have a 'const' pointer to be able to pass it to this API).
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@798 2fbb986a-6c06-0410-b554-c9c1f0a7f128
Made the q931_call record point to the master D channel control structure
instead of the BRI TEI subchannel control structure. When a layer 3 message
is sent, the current TEI subchannel control structure is used.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@790 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This adds support for two new message types: Service and Service Acknowledge.
When a channel receives a service message it will either take the channel in
or out of service and then send a service acknowledgment. Although not
enforced here (enforced in chan_dahdi), the service messages are only supported
with switch types 4ess/5ess. The required Asterisk changes will be coming next.
(issue #3450)
Reported by: cmaj
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@732 2fbb986a-6c06-0410-b554-c9c1f0a7f128