Commit Graph

53 Commits

Author SHA1 Message Date
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
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
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
0c210c19fa Take diverted-to-number from DivLegInfo1 and use it as connected number.
If no connected number is signaled in the CONNECT message we will use the
last diverted to number.

(issue #14292)
Reported by: tomaso
Patches:
      divleginfo1_to_connectednum.patch uploaded by tomaso (license 564)
      (Used as a guide since it no longer will apply.)
      (This patch is unrelated to the issue.)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1212 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-15 22:34:52 +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
3a9af361fd Sent Q.SIG call rerouting message fixes.
a) Account for pSS1InfoElement where the bearer capability for the new
rerouted call is described.  The call could be a fax or data call, let's
use the appropriate signaling to avoid call rejects on the other end.
b) Handle calling number appropriately, number can be prohibited or
non-existent.
c) Add calling name if available.
d) Use the diversion counter from DivLegInfo2 (if was present in the
incoming Setup) and increment.

(issue #14292)
Reported by: tomaso
Patches:
      libpri-1.4-2009-01-29-rerouting-0.1.9.patch uploaded by tomaso (license 564)
      (Used as a guide since it no longer will apply.)
      (This patch is unrelated to the issue.)



git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1152 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-07 18:34:06 +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
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
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
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
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
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
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
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
Matthew Fredrickson
e498bef21f Merged revisions 460 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r460 | mattf | 2007-09-06 10:06:42 -0500 (Thu, 06 Sep 2007) | 1 line

TBCT now works.  It should work for NI2, 4E, and 5E.  This code was tested on NI2.
........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@462 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2007-09-06 15:11:29 +00:00
Matthew Fredrickson
a17ce5bdea Merged revisions 423 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r423 | mattf | 2007-06-06 16:57:15 -0500 (Wed, 06 Jun 2007) | 1 line

Oops, that should not be on one line
........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@424 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2007-06-06 21:58:22 +00:00
Matthew Fredrickson
fcd5775b8b Merged revisions 415 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r415 | mattf | 2007-06-06 08:20:05 -0500 (Wed, 06 Jun 2007) | 2 lines

Make sure we only send the NFE when we are talking QSIG

........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@416 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2007-06-06 13:22:15 +00:00
Kevin P. Fleming
3ea2ea8cf1 Merged revisions 296,306 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r296 | russell | 2006-01-17 22:53:47 -0600 (Tue, 17 Jan 2006) | 2 lines

remove old ChangeLog ... it will now only be in the tags

........
r306 | kpfleming | 2006-02-13 17:06:02 -0600 (Mon, 13 Feb 2006) | 2 lines

suppress annoying message about unsupported components in facility messages

........


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@308 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-02-13 23:07:56 +00:00
Matthew Fredrickson
681a5f582e RLT works!!! Tested successfully on a DMS100 switch. (For those wondering, RLT
is basically 2 B-channel transfer on DMS100)


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@305 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-19 23:27:27 +00:00
Matthew Fredrickson
30188c642d More changes for RLT
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@302 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-19 22:18:01 +00:00
Matthew Fredrickson
4c20e50a5d Fix the extension bit on our facility IE
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@300 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-19 21:15:31 +00:00
Matthew Fredrickson
6b5781bb3a More silly cleanups
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@299 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-19 18:36:32 +00:00
Matthew Fredrickson
333a5eb67a Header file cleanups
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@298 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-19 18:31:48 +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
Matthew Fredrickson
8fa183a4bc Lots of changes for APDU handling and debugging. Thanks PCadach (bug #5265)!
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@286 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-01-05 20:50:51 +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
160b8c91b8 Fix so that APDUs are not added multiple times for a call (Bug #5361)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@252 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-10-04 17:35:48 +00:00
Anthony Minessale II
9842934154 fixing compile errors! check the patch but if it's wrong it's better than not compiling at all
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@250 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-09-16 17:15:57 +00:00
Matthew Fredrickson
f64108e394 Don't specify DS1 on Q.SIG
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@249 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-09-16 17:02:44 +00:00
Matthew Fredrickson
bbd1d88f70 Fix for gcc-4.0
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@241 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-07-13 14:09:16 +00:00
Matthew Fredrickson
badbe8cf1f Fix for non constructed number component
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@240 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-07-12 20:15:20 +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
849ec03cb0 more ASN.1 parsing fixes
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@228 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-03 18:29:25 +00:00
Matthew Fredrickson
9bcef26cd6 More ASN.1 size fixes
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@227 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-02 22:40:35 +00:00
Matthew Fredrickson
c9710c8b33 More fixes for indefinite length in the ASN.1 parsing routines
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@226 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-02 20:58:32 +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
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
3e8f5869ae More little callername tweaks
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@213 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-04-21 21:58:21 +00:00
Matthew Fredrickson
4ecc27efab Round two with CPE callername sending
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@212 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-04-21 19:58:14 +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
Matthew Fredrickson
d7b60b28e0 Just send callername APDUs if we're network side
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@201 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-03-16 15:10:41 +00:00
Matthew Fredrickson
84adda970c Fixed some free() bugs in the APDU code.
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@200 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-03-10 20:37:16 +00:00
Matthew Fredrickson
9d279a6d6e Adding debug level for APDUs
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@196 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-03-02 16:03:22 +00:00
Matthew Fredrickson
86cf50b9c3 Big PRI commit. Merges bugs 3623 and 3554 back. Includes additional
event for Q931_IE_KEYPAD_FACILITY and all of the various Q.SIG functions,
2BCT on 5ESS, and a few other random changes


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@195 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-03-02 15:56:11 +00:00