Commit Graph

410 Commits

Author SHA1 Message Date
Richard Mudgett
c8de5d057b Timeout events with subcmds should clear any old subcmds.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1084 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-15 22:24:12 +00:00
Matthew Fredrickson
25b2496b0f Output multiline output with multiple calls to pri_message, so that logs look normal in Asterisk
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1077 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-14 22:32:40 +00:00
Dwayne M. Hubbard
d9af5b25ce Add SERVICE message support for the 'national' switchtype
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
2009-09-13 22:54:10 +00:00
Richard Mudgett
c3074dafc1 Converted Q931_CALL_STATE_xxx defines to an enum.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1061 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-02 20:19:40 +00:00
Richard Mudgett
6d9c1cb0d9 Optimized calls to pri_schedule_del().
There is no need to test if a scheduled event is running before calling
pri_schedule_del().


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1060 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-02 20:04:03 +00:00
Richard Mudgett
6d5aeb7cdd Cleaned up scheduled events handling code.
*  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
2009-09-02 19:49:58 +00:00
Richard Mudgett
503ef0531a Make event channel parameter encoding consistent.
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
2009-08-31 22:57:58 +00:00
Richard Mudgett
e7c9ecb1b2 Split justsignalling into cis_call and cis_auto_disconnect functionality.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1042 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-31 17:24:19 +00:00
Richard Mudgett
61f7a372d9 Fix BRI PTP broken by -r790.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1028 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-26 15:24:34 +00:00
Richard Mudgett
97f33e3286 Put connected name in display ie for CONNECT message.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1019 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-25 16:50:56 +00:00
Richard Mudgett
3908bf2e48 Fix ie ordering in some ie lists for send_message().
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1018 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-25 16:49:07 +00:00
Richard Mudgett
176f0bf6cd Make dump_channel_id() handle variable length fields.
Also did some other minor miscellaneous changes.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1012 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-24 23:06:39 +00:00
Richard Mudgett
d32e70d473 Make sure reversecharge is initialized.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1006 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-24 22:09:38 +00:00
Jason Parker
69fecfd30a Add -n to ldconfig on HURD too.
(closes issue #15130)
Reported by: tzafrir
Patches:
      osarch_hurd.diff uploaded by tzafrir (license 46)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1000 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-21 19:51:40 +00:00
Richard Mudgett
2ada419b08 Made the call state to string table use the state defines.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@994 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-20 15:52:27 +00:00
Richard Mudgett
dcd62e467f Add COLP support to libpri for ETSI PTP, ETSI PTMP, and Q.SIG.
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
2009-08-18 23:53:32 +00:00
Jeff Peeler
926cc924d2 Allow custom CPU optimization flags
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
2009-08-18 20:59:32 +00:00
Richard Mudgett
13fbd05e0b Corrected standard document reference.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@968 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-08-07 15:53:20 +00:00
Richard Mudgett
f04f345113 Fixed potential NULL pointer dereference.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@952 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-07-23 20:53:59 +00:00
Richard Mudgett
27a5c7afb6 Fix potential buffer overflow in pri_dump_info_str().
*  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
2009-06-26 19:50:19 +00:00
Richard Mudgett
01e637393e Eliminate local version of PRI_MAX_TIMERS.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@920 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-26 19:43:13 +00:00
Richard Mudgett
4f0b3f3109 Doxygenify the timer comments.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@919 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-26 19:41:56 +00:00
Richard Mudgett
24cc37a839 Added printf format attribute to pri_message() and pri_error() and fixed some detected errors.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@914 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-26 18:37:15 +00:00
Sean Bright
562e1fb7ca Add support for sending Reverse Charging Indication IE on ISDN PRI.
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
2009-06-25 18:53:38 +00:00
Richard Mudgett
c5cdc66b72 Convert PRI_TIMER_xxx to an enum so PRI_MAX_TIMERS can be automatically adjusted.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@901 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-25 17:35:23 +00:00
Richard Mudgett
2eaca806b9 Make it easier to add more timers/counters and vary the defaults based upon switchtype.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@894 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-24 21:45:04 +00:00
Sean Bright
7092459702 Capture and expose the Reverse Charging Indication IE on ISDN PRI.
(issue #13760)
Reported by: mrgabu
Patches:
      20090619_libpri_1.4.patch uploaded by seanbright (license 71)
Tested by: seanbright, pruonckk

Review: https://reviewboard.asterisk.org/r/291/


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@885 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-24 18:19:24 +00:00
Sean Bright
64fd25fcac Revert unintentional changes
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@879 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-23 23:15:56 +00:00
Sean Bright
16304b6a65 Set reviewboard property.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@878 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-23 23:15:04 +00:00
Richard Mudgett
ea4d305ffb Miscellaneous minor changes.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@865 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-12 14:29:42 +00:00
Matthew Fredrickson
3a1739883b There are two changes in this commit that are bug fixes for various Q.921 issues found in internal testing.
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
2009-06-09 19:47:05 +00:00
Richard Mudgett
47830a68aa Made ASN.1 memory dump also display printable characters.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@848 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-03 22:51:42 +00:00
Richard Mudgett
2176bd7fa3 Renamed callstate2str() to q931_call_state_str().
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@842 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-03 21:35:14 +00:00
Richard Mudgett
3c12135659 Made transmit_facility() debug message indiate to which message the facility ie is being added.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@836 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-03 21:25:59 +00:00
Richard Mudgett
c69e4780ef Renamed local struct pri *pri variables to struct pri *ctrl in q931.c.
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
2009-05-29 15:39:48 +00:00
Richard Mudgett
e7b64b16da Removed usage of FUNC_DUMP(), FUNC_RECV(), and FUNC_SEND() defines.
They did not really help and hindered easy lookup of parameter types.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@804 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-05-20 15:03:34 +00:00
Kevin P. Fleming
39f7f72d8f Add 'const' qualifier to character string argument to keypad facility API calls
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
2009-05-13 15:17:08 +00:00
Richard Mudgett
5484712af0 Minor code clean up.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@794 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-05-07 16:21:24 +00:00
Richard Mudgett
a5b9b792ea Avoid a stale pointer crash if the TE BRI TEI is removed when active calls exist.
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
2009-05-07 16:06:19 +00:00
Richard Mudgett
c430cba165 Added Q.931 call state description comments.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@786 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-05-05 22:25:03 +00:00
Richard Mudgett
ac40946c11 Comment changes.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@782 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-05-01 22:47:41 +00:00
Richard Mudgett
b19c0b0a04 Added Q.SIG Advice-Of-Charge encode/decode routines.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@772 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-04-21 23:32:13 +00:00
Richard Mudgett
ba45095c5a ROSE ASN.1 facility encode and decode rewrite of existing messages.
Several components are now parsed correctly.  Most notably:
PartyNumber and Q.SIG Name.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@766 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-04-21 22:08:45 +00:00
Jeff Peeler
18fa4716a5 Add service maintenance message support
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
2009-04-14 15:05:21 +00:00
Richard Mudgett
f9d5aa3c3a Comment changes and some string content corrections.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@726 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-04-02 19:33:38 +00:00
Richard Mudgett
88551af7ef Comment changes to note what ISDN message type causes the event.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@715 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-03-26 16:01:45 +00:00
Richard Mudgett
29ded17c0b Added pSS1InfoElement comments in qsig_cf_callrerouting().
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@711 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-03-19 01:39:21 +00:00
Richard Mudgett
bbaeec9513 Use the correct branch integrated property when generating the version string.
Update the make_version file to the latest Asterisk version with the
appropriate libpri required chage.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@705 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-03-13 01:05:54 +00:00
Joshua Colp
48fc219865 Make sure we only have 4 octects on unrestricted 64k data calls.
(closes issue #14507)
Reported by: jsmith
Patches:
      64k-data.patch uploaded by jsmith (license 15)
Tested by: jsmith
(closes issue #13118)
Reported by: radpeter


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@701 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-03-04 20:31:20 +00:00
Leif Madsen
9ecdbed001 Fix a small spelling error.
(closes issue #14375)
Reported by: jeremy1

git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@687 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-02-02 20:18:03 +00:00