Commit Graph

266 Commits

Author SHA1 Message Date
Richard Mudgett
b79b886fc4 Fix bizarre logic to work as originally intended in q931_notify().
In revision 238: Don't allow notification codes outside of the Q.931 spec
for switches other than EuroISDN.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2166 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-12-14 00:55:49 +00:00
Richard Mudgett
7f55b600e0 Fixes CC agents not automatically clearing if T309 clears the original call.
Incoming calls with CC enabled will not automatically clear the CC offer
record when the call is aborted by T309 processing.  All CC agent FSM's
have this problem (PTMP, PTP, and Q.SIG).

To reproduce:
1) Place incoming call to Asterisk/libpri
2) Either before or after the call is answered, bring the ISDN link down.
3) T309 processing, T309 timeout, or TEI removal will leave the CC agent
FSM in the CC available state.

The problem is indicated by the "cc report status" CLI command showing a
status of CC offered to caller but it will never timeout.

The FSM's can be manually cleared by using the "cc cancel all" or "cc
cancel core" CLI commands.

JIRA LIBPRI-46
JIRA SWP-2241


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2079 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-21 18:00:03 +00:00
Richard Mudgett
f9c3c8d026 Extract the layer 2 link structure out of struct pri.
This completes the layer 2 link and Q.931 call control restructuring.
Some code is now simplified since there is only one D channel control
structure and the amount of allocated memory is reduced.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2077 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-21 17:30:41 +00:00
Richard Mudgett
53c142990f Restructure the Q.931 call record to layer 2 link association.
This is in anticipation of extracting a layer 2 link structure out of
struct pri.

Also completes fixing timer value access for the rest of libpri.  The
timer access must always be on the D channel control structure (Master).

May have fixed some events from timeouts not being passed to the upper
layer.  The timeout events must always be on the D channel control
structure (Master).


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2070 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-21 16:37:10 +00:00
Richard Mudgett
31b4b63b40 Create two versions of call ptr verify. One gripes and one does not.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2027 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-15 16:39:10 +00:00
Richard Mudgett
fb61cedfd7 Crash when receiving an unknown/unsupported message type.
Fix double free of a call record and the subsequent continued use of the
freed call record when receiving an unsupported/unknown message type.

(closes issue #17968)
Reported by: gelo
Patches:
      issue_17968_v1.4.patch uploaded by rmudgett (license 664)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2021 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-14 18:35:48 +00:00
Richard Mudgett
2045db6a69 Segfault in pri_schedule_del() - ctrl value is invalid.
Validate the given call pointer in libpri API calls.  If the call pointer
is not an active call record then a complaint message is issued and the
API call aborts.  The call pointer is likely stale.

This patch is defensive.  More information is needed to figure out why
Asterisk still has a call pointer during its hangup sequence.

(closes issue #17522)
(closes issue #18032)
Reported by: schmoozecom
Patches:
      issue_18032_v1.4.patch uploaded by rmudgett (license 664)
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2015 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-14 17:09:40 +00:00
Richard Mudgett
384ae1e688 PRI links do not retain active calls if the link comes back before T309 expires.
The DL-ESTABLISH confirm event was not passed from Q.921 to Q.931 so Q.931
never cancelled the T309 timer.

Refactored q931_dl_tei_removal() and q931_dl_indication() into
q931_dl_event() to allow the DL-ESTABLISH confirm/indication and
DL-RELEASE confirm/indication events to be passed to Q.931.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1991 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-13 21:21:37 +00:00
Richard Mudgett
05158ec5fb BRI PTMP: Active channels not cleared when the interface goes down.
If the connection to the terminal is lost while there are open channels
on the interface, red alarm is reported, but the open channels are never
cleared.  Additionally, if you manually try to channel request hangup,
Asterisk crashes.

For PTMP, the T309 processing was not searching the call pool on the
master control record.  Additionally, for NT PTMP, the timeout events were
not passed to the upper layer because the events were not put on the
master control record where timer processing expects them.

(closes issue #17865)
Reported by: wimpy
Patches:
      issue17865_v1.4.patch uploaded by rmudgett (license 664)
Tested by: rmudgett, wimpy


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1982 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-13 16:07:24 +00:00
Richard Mudgett
c20f34992a Made Q.921 delay events to Q.931 if the event could immediately generate response frames.
Q.921 was passing a q931_dl_indication(up) event to Q.931 before it was
finished processing the frame.  The q931_dl_indication(up) event could
immediately send STATUS messages in the Q.921 intermediate state that
would then get stuck in the tx queue with an invalid N(S).

Q.921 was passing i-frames to Q.931 before it was finished processing the
frame.  The i-frames could cause Q.931 to immediately generate a response
message that may cause the peer to see the P/F bit as incorrect.

Delayed passing q931_dl_indication(up) events and i-frames to Q.931 until
Q.921 has completed processing the frame event.  (The Q.921 SDL diagrams
were designed with this assumption.)

(closes issue #17360)
Reported by: shawkris
Patches:
      issue17360_v1.4.patch uploaded by rmudgett (license 664)
Tested by: shawkris, rmudgett


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1962 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-08 00:13:24 +00:00
Richard Mudgett
ad998f6f64 Prevent a CONNECT message from sending a CONNECT ACKNOWLEDGE in the wrong state.
Filter the processing of the CONNECT message to prevent libpri from
sending a CONNECT ACKNOWLEDGE when the call is in an inappropriate state.
This can happen when we hang up an outgoing call after the other end has
sent a CONNECT but before we have processed the CONNECT.

(issue #17360)
Reported by: shawkris
Patches:
      issue17360_con_ack_v1.4.patch uploaded by rmudgett (license 664)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1961 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-08 00:10:05 +00:00
Richard Mudgett
4011816ead Balance curly braces in post_handle_q931_message().
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1958 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-07 23:13:04 +00:00
Richard Mudgett
0089f4777a Q.921/Q.931 message debug output improvements.
The Q.931 message decode debug output now will follow the correct Q.921
header decode if Q.921 message dumping is enabled.  Also the Q.931 message
decode will happen when the message actually goes out on the line instead
of when Q.931 passes the message to Q.921.  Q.921 may have to request a
TEI, bring the connection up, or retransmit previous frames before it can
actually send the new message.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1928 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-30 20:30:59 +00:00
Richard Mudgett
e12b0913ec Convert most references of Q931_MAX_TEI to use ARRAY_LEN().
* Minor comment correction in q931_destroycall().
* Redundant logic removal q931_destroycall().
"W && X && (Y || W && Z)" is the same as "W && X && (Y || Z)"


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1912 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-27 23:37:46 +00:00
Richard Mudgett
b2e28bd1e4 No audio on inbound J1 calls.
Incoming calls specifying the channel using a slot map could not negotiate
a B channel correctly.  Libpri historically has handled this as an any
channel request.  However, when chan_dahdi picked a new channel, libpri
sent out the recorded slot map and not the new channel selected.  Thus the
two endpoints would be attached to different B channels and the parties
would not hear anything or would hear the wrong parties.

This patch restores the historical preference of sending out the channel
id using the channel number method if a channel number is available.

JIRA LIBPRI-35
Patches:
      libpri-35_v1.4.11.3.patch uploaded by rmudgett (license 664)
      libpri-35_v1.4.patch uploaded by rmudgett (license 664)
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1853 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-06 18:35:35 +00:00
Richard Mudgett
fc203e3101 Improved Q.921/Q.931 debug output.
* Debug output for a sent Q.931 message in TE PTMP now uses the best
available TEI number instead of always using 127.  It could still be wrong
if layer 2 does not have a TEI assigned.

* Q.921 debug output is grouped better so a decoded message is not split
by a blank line.

* The Q.921 state is also decoded to a name.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1848 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-03 23:04:52 +00:00
Richard Mudgett
c5fce8da41 [regression] Calling Number assignment logic change in libpri 1.4.11.
Restored the old behaviour if there is more than one calling number in the
incoming SETUP message.  A network provided number is reported as ANI.

(closes issue #17495)
Reported by: ibercom
Patches:
      issue_17495_v1.4.11.2.patch uploaded by rmudgett (license 664)
      issue_17495_v1.4.patch uploaded by rmudgett (license 664)
Tested by: ibercom


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1823 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-06-29 16:15:03 +00:00
Richard Mudgett
bf5ef150e6 PRI: XXX Missing handling for mandatory IE 12
The switch is sending the Connected Address ie (12) and there was no
handler for that ie.  That is why the reporter was getting the "Missing
mandatory ie" message.

The simple fix is to just add the missing receive handler for that ie.
Since connected line (COLP) functionality has been added and this is just
an alternate for the Connected Number ie (0x4C), the handler was already
written.  I also changed the ie name to what Q.931 calls it: Connected
Address.

Also some minor code clean up in q931_handle_ie() and ie2str().

JIRA SWP-1678
(closes issue #16915)
Reported by: kobaz


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1818 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-06-25 20:22:23 +00:00
Richard Mudgett
505181cc1e Multi component FACILITY messages only process the first component.
The code was only processing the first ROSE component in the facility
message.  I also updated rosetest.c to have a multiple component ROSE
message test.

(closes issue #17428)
Reported by: patrol-cz
Patches:
      issue17428.patch uploaded by rmudgett (license 664)
Tested by: rmudgett, patrol-cz


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1785 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-06-01 16:30:09 +00:00
David Vossel
660609c45b support for sending ETSI advice of charge
Review: https://reviewboard.asterisk.org/r/619/


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1776 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-28 22:34:24 +00:00
Richard Mudgett
e4b8bed7e9 ETSI Call Waiting support.
Add the ability to announce a call to an endpoint when there are no B
channels available.  A call waiting call is a SETUP message with no B
channel selected.

Relevant specification: EN 300 056, EN 300 057, EN 300 058

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


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1746 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-28 18:43:57 +00:00
Richard Mudgett
382e7e5c86 Added ETSI Explicit Call Transfer (ECT) support.
Added ability to send and receive ETSI ECT messages to eliminate tromboned
calls.

Added ETSI support to an existing API call to send ECT messages when the
upper level indicates to transfer specified calls.

The libpri API was extended to indicate to the upper layer that the far
end requests the transfer of the indicated calls.

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


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1723 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-28 15:19:08 +00:00
Richard Mudgett
6829faae06 Add Call Completion Suppplementary Service
Call Completion Supplementary Service (CCSS) added for the following 
switch types: ETSI PTMP, ETSI PTP, Q.SIG.  

Specifications:
ETS 300 359 CCBS for PTMP and PTP
ETS 301 065 CCNR for PTMP and PTP
ECMA-186 Call Completion for Q.SIG

Several support services were added to support CC:
Dummy Call Reference.
Q.931 REGISTER message.
Dynamic expansion of the number of available timers (up to 8192).
Enhanced facility message handling.

Current implementation limitations preclude the following:
CC service retention is not supported.
Q.SIG path reservation is not supported.

(closes issue #14292)
Reported by: tomaso
Tested by: rmudgett

JIRA SWP-1493

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


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1714 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-26 16:01:10 +00:00
Richard Mudgett
07b3f1dc45 T309 should not do anything with the global call reference call record.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1703 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-19 21:50:34 +00:00
Richard Mudgett
d808143f8f Dialing an invalid extension causes incomplete hangup sequence.
Revision -r1489 corrected a deviation from Q.931 Section 5.3.2.  However,
this resulted in an unexpected behaviour change to the upper layer
(Asterisk).

This change restores the legacy hangup behaviour if the new API call is
not used.  Use pri_hangup_fix_enable() to follow Q.931 Section 5.3.2 call
hangup better.

(closes issue #17104)
Reported by: shawkris
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1688 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-11 22:14:15 +00:00
Richard Mudgett
14c3616e02 Simplified some protocol discriminator handling code.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1675 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-26 19:54:00 +00:00
Richard Mudgett
bfcab2eabe Garbage on the end of Q.931 messages causing calls to fail to connect.
The DAHDI driver had a bug where an extra byte appeared on the end of
Q.931 messages.  This garbage byte caused the message to be discarded with
the diagnostic "XXX Message longer than it should be??  XXX".  The Q.931
message will no longer be discarded if there were earlier ie's in the
message.

This patch also addresses the potential problem of reading beyond the
buffer when trying to parse the garbage data.

Thanks to roeften for the base patch.

(closes issue #14378)
Reported by: timking


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1674 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-26 19:39:28 +00:00
Richard Mudgett
d933b7e7e6 Cleanup some pri debug output line presentation.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1664 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-26 16:57:57 +00:00
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
9a7686d792 Only one PROCEEDING message per call please.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1577 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-09 21:43:42 +00:00
Richard Mudgett
ba4d759752 Move a comment closer to where it has relevance.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1547 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-03-18 15:50:19 +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
307264f7c6 Must send DISCONNECT if we have sent a response to a SETUP message.
Q.931 Section 5.3.2 a) says we send a RELEASE_COMPLETE to reject a call
SETUP if we have not already sent a message in response to the SETUP
message.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1489 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-02-11 21:47:24 +00:00
Richard Mudgett
7dd6494c61 Fix TE PTMP side sending FACILITY messages on the dummy call reference.
Only the NT PTMP side can send Q.931 broadcast messages.

Also removed an inaccurate comment in Q.921 and made
q921_mdl_handle_error_callback() call the correct struct pri free
function.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1426 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-19 21:53:31 +00:00
Richard Mudgett
79fbecc5ae Make some debugging messages conditional and some minor reformating changes.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1414 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-15 18:28:54 +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
14f04072c8 Extracted q931_fill_ring_event() from post_handle_q931_message().
Done so it is easier to see what was done in ccbs branch.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1374 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-12-09 20:59:16 +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
04d911112d Merged revision 1328 from
https://origsvn.digium.com/svn/libpri/team/mattf/libpri-1.4-q921-rewrite

..........
  r1328 | mattf | 2009-11-17 15:16:11 -0600 (Tue, 17 Nov 2009) | 1 line

  outboundbroadcast isn't set at this time, since it is set after the
  message is transmited, so we must use other criteria to determine the need
  for broadcast on a setup
..........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1331 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-18 00:36:20 +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
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
618acf9d53 Unknown IE 50 (cs5, Unknown Information Element)
Add code to recognize the code set 5 ie 50 (calling party category) to
suppress the unknown IE message.

(closes issue #13828)
Reported by: fdecher
Patches:
      libpri_ie50_cs5-trunk.diff3.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1261 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-03 17:19:20 +00:00
Richard Mudgett
9f39144986 NT PTMP did not report busy when calling a busy phone.
The caller would not get a busy indication when calling a busy phone.
Timer T303 is not supposed to be stopped when RELEASE_COMPLETE received.
When T303 expires we will now report the last clearing cause code to the
caller if we received one.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1255 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-02 23:28:59 +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
6cb01561eb Fix call state ie transmission.
Sending a STATUS message failed to include the call state ie for some
reason.  We will now always send a call state ie when a message ie list
includes one.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1220 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-19 22:49:59 +00:00
Richard Mudgett
5537dbec1d Fix comparision of invalid party name and number structs in comparison functions.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1219 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-19 22:38:32 +00:00
Richard Mudgett
92c277dae5 In q931_getcall(): Simplify test and add related switch types.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1205 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-14 19:03:49 +00:00
Richard Mudgett
28e7e1cdfe Reduce future conflicts when adding ie's to the SETUP message.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1191 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-13 19:06:26 +00:00