Commit Graph

68 Commits

Author SHA1 Message Date
Richard Mudgett
e42108aaae PTMP NT mode call reference value ambiguity.
Since the TE side can pick CR values independently, the TE CR needs to be
qualified by TEI to distinguish CR values from other devices.  Without
doing this, multiple phones on the BRI line will have intermittent call
failures.

JIRA LIBPRI-30

Also eliminated some wierdness in q931_status() and several places where
it is called.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1630 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-19 22:40:41 +00:00
Richard Mudgett
5ff4710e77 Make some internal routines available to other libpri components.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1596 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-15 18:43:37 +00:00
Richard Mudgett
d5d69dddac Miscellaneous simple reorganization.
1) Make PRI_MASTER() no longer check for a NULL parameter.  It is the
caller's responsibility.  Not many callers could have passed a NULL
without crashing before or after anyway.

2) Replace calls to q931_is_ptmp() with PTMP_MODE().  They were
equivalent.

3) Made the following boolean config options bit fields: sendfacility,
overlapdial, chan_mapping_logical, and service_message_support.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1534 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-03-17 17:47:53 +00:00
Richard Mudgett
68a107a3e3 Restore ability to change the Q.921 K value.
The Q.921 rewrite only used value of PRI_TIMER_K right after it was set to
the default.  The Q.921 window size was thus no longer alterable by the
user.

(closes issue #16909)
Reported by: alecdavis
Patches:
      pritimer.libpri.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1511 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-03-02 23:47:12 +00:00
Matthew Fredrickson
4d3bb14731 Merge of Q.921 rewrite branch for wider testing.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1406 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-13 19:37:59 +00:00
Richard Mudgett
46df6d2cd4 Fix debug output so built up output lines are readable again.
A recent change to Asterisk put the span number at the begining of each
line.  This is a good thing if you need to debug multiple spans or forget
which span you are debugging.  Unfortunately, any pri_message() output
that is not a complete line is messed up.

The pri_message() function now will accumulate line output until a '\n' is
seen on the end.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1351 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-21 02:40:23 +00:00
Richard Mudgett
b9397c7541 Delay processing of facility ie's after all other ie's are processed.
*  Some ROSE message processing depends on the presence of other ies.  The
DivertingLegInformation1, and 3 messages will be used as the default
connected line number if the connected number ie is not present.  The
redirecting number ie is used as a default to the redirecting number in
the DivertingLegInformation2 message if the ROSE message does not contain
it and the redirecting number ie is present.

*  Some ROSE message processing depends upon other ie values.  The
StatusRequest, CCBS-T-Call, and CcRingout messages collectively need the
BC, HLC, LLC, called number, called subaddress, calling number, and
calling subaddress ie information to be available.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1345 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-20 23:42:40 +00:00
Richard Mudgett
b698032e04 Reimplement callback mechanism to handle APDU response messages that we care about.
1) No sent messages will remain in the APDU queue unless they have an
active timer to remove them.  The dummy call reference call and global
call reference call structures will not act like a memory leak to sent
messages.

2) The new T-RESPONSE timer will be the generic response guard if the
standards do not otherwise specify a timer for a message response.

3) The callback will be called.  If it is called because of a response
message, then the callback has an opportunity to indicate if more
responses are expected.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1322 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-14 00:20:53 +00:00
Richard Mudgett
d305dbc609 There must be only one source for the invoke id values per D channel group.
If there are potentially multiple sources for the invoke id sequence then
we could get confused if there are multiple outstanding messages with the
same invoke id that get responses.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1310 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-13 22:59:35 +00:00
Matthew Fredrickson
80c8c46b89 Make sure we also revive links for PRIs, not just PTMP TE BRIs when we get a disconnect message
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1291 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-11 00:22:47 +00:00
Richard Mudgett
6a121d4c74 The facility ie queue needs to remove facilities that have been sent.
The facility ie queue needs to remove facilities that have been sent.
Otherwise, the queue just grows until the call is terminated.  AOC
messages can clog the queue during a long call and the dummy call
reference may never be deleted.

Also removed unneeded elements of struct apdu_event.  The callback
function was not a good idea since many facility messages do not have
responses and the callback would prevents removal of events from the list.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1283 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-10 21:51:26 +00:00
Richard Mudgett
e23ea9568c Add dummy call reference support.
Fixes problem where PTMP NT mode responds erroneously to a FACILITY
message from a phone on the dummy call reference.  LibPRI behaved as if
the dummy call reference were an invalid call reference and proceeded to
respond on the global call reference.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1275 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-10 19:27:34 +00:00
Richard Mudgett
c7c670aa85 Remove unused callingsubaddr[].
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1268 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-09 20:53:10 +00:00
Richard Mudgett
16f2f02ce8 Add subaddress handling to existing messages and functions.
Connected line updates when transfering calls does not completely support
subaddresses yet.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1249 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-23 23:47:58 +00:00
Richard Mudgett
a2dcb6adba Add BRI PTMP NT mode, HOLD/RETRIEVE, Call rerouting/deflection, and keypad facility support.
* Added support for BRI PTMP NT mode.  (Overlap dialing NT -> TE not supported.)
* Added handling of received HOLD/RETRIEVE messages and the optional ability
  to transfer a held call on disconnect similar to an analog phone.
* Added CallRerouting/CallDeflection support for Q.SIG, ETSI PTP, ETSI PTMP.
  Will reroute/deflect an outgoing call when receive the message.
  Can use the DAHDISendCallreroutingFacility to send the message for the
  supported switches.
* Added ability to send/receive keypad digits in the SETUP message.
  Send keypad digits in SETUP message: Dial(DAHDI/g1[/K<keypad_digits>][/extension])
  Access any received keypad digits in SETUP message by: ${CHANNEL(keypad_digits)}

(closes issue #15048)
Tested by: rmudgett, mattf


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1242 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-23 19:50:45 +00:00
Richard Mudgett
a78ee730c9 Add support for calling and called subaddress. Partial support for COLP subaddress.
The Telecom Specs in NZ suggests that SUB ADDRESS is always on, so doing
"desk to desk" between offices each with an asterisk box over the ISDN
should then be possible, without a whole load of DDI numbers required.

(closes issue #15604)
Reported by: alecdavis
Patches:
      libpri_subaddr_trunk.diff11.txt uploaded by alecdavis (license 585)
      Some minor modificatons were made.
Tested by: alecdavis, rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1230 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-22 16:16:50 +00:00
Richard Mudgett
296c64df23 Miscellaneous changes:
*  Removed unnecessary Q931_IE_CONNECTED_NUM ie from setup_ack_ies[].
*  Added internal state Q931_CALL_STATE_NOT_SET to Q.931 state enum.
*  Made q931_is_ptmp() take a const pointer.
*  pri_facility.c: Some preparations for subaddressing.
*  pri.c: Eliminate use of a magic number.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1177 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-12 17:17:48 +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
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
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
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
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
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
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
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
Matthew Fredrickson
e1bfec4b1e Merging in additional Q.SIG features in #13454. Includes Q.SIG physical/logical channel mapping support, extended coding of Q.SIG name operations (calling name), and call rerouting support via added dialplan application.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@636 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2008-10-17 16:13:42 +00:00
Kevin P. Fleming
64eaca5bfa Merged revisions 610 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r610 | kpfleming | 2008-08-05 17:16:58 -0500 (Tue, 05 Aug 2008) | 2 lines

clean up license headers, and explicitly grant additional permissions when used with Asterisk

........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@611 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2008-08-05 22:18:12 +00:00
Kevin P. Fleming
16df54e01a correct comments to match code
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@594 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2008-07-22 22:36:25 +00:00
Kevin P. Fleming
16719a5f74 rename API call and option (nothing has been released to use it yet so this should be safe) to be more accurate in describing what it does
(closes issue #13042)



git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@589 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2008-07-22 19:43:26 +00:00
Kevin P. Fleming
aad7c3e8f1 modify work done for issue #10552, making the support of inband audio after RELEASE a configurable option, since it is causing problems for a number of users
(closes issue #13042)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@574 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2008-07-11 16:24:01 +00:00
Matthew Fredrickson
b9a6ab0c69 Moving trunk changes back into 1.4
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@557 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2008-05-07 19:51:44 +00:00
Kevin P. Fleming
33a28eeda1 Merged revisions 478 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r478 | kpfleming | 2007-10-22 10:09:27 -0500 (Mon, 22 Oct 2007) | 3 lines

we need to include stddef.h for 'size_t'


........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@479 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2007-10-22 15:10:06 +00:00
Matthew Fredrickson
de008c4d60 Changes to improve state reporting in libpri. (#7260)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@350 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-06-06 22:06:52 +00:00
Matthew Fredrickson
0e2e37b537 Numerous updates for RLT (just remember, trunk can be a bumpy ride)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@297 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-19 18:22:06 +00:00
Russell Bryant
9c8628715f change 'char *' to 'const char *' for useruserinfo to go along with the fixes
from r7327 in the asterisk trunk


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@277 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-12-04 15:32:46 +00:00
Matthew Fredrickson
8d6d58ab09 Add in keypad facility transmission support
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@271 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-12-01 17:59:56 +00:00
Kevin P. Fleming
cf8c723f8b remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@266 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-11-29 18:39:18 +00:00
Matthew Fredrickson
e0de929e20 Updates so that one can do user to user IE transmission
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@253 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-10-21 20:20:22 +00:00
Kevin P. Fleming
25cb0b7457 forward more ANI information to users of libpri (bug #4571)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@239 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-07-12 02:33:25 +00:00
Kevin P. Fleming
f622f51004 use libpri_copy_string() (same as ast_copy_string()) instead of strncpy
update file headers for proper copyrights and licenses
various other minor optimizations


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@230 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-21 22:47:39 +00:00
Kevin P. Fleming
6694b84e88 record network-provided-number as ANI when supplied (bug #4537)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@229 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-21 20:37:22 +00:00
Matthew Fredrickson
64088fe864 PRI debug additions -- testing...
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@219 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-05-23 15:06:33 +00:00
Matthew Fredrickson
1e4b4fbdbb Explicit versus implicit DS1 selection options
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@218 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-05-19 14:06:43 +00:00
Matthew Fredrickson
8205ce358a Add support to enable/disable facility IE Supplementary Services
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@217 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-05-12 14:48:00 +00:00
Matthew Fredrickson
e4fbf8c388 BIG libpri-matt merge. Adding new event information and fixing the
parsing routing for DivertingLegInformation2 so that it can work with
indefinite length-encoded ASN.1 parameters


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@209 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-04-06 19:42:41 +00:00
Matthew Fredrickson
240cd3ece0 Merging Advice of Charge code into libpri (bug #3843)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@206 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-04-05 03:55:58 +00:00