Generic Advice of Charge.

Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
  (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages

Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup

AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.

SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
  snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
  'snom_aoc_enabled' sip.conf option.

IAX AOC Support
- Natively supports AOC pass-through through the use of the new
  AST_CONTROL_AOC frame type

DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
  pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
  example usage:
  ;requests AOC-S, AOC-D, and AOC-E on call setup
  exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2010-06-02 18:10:15 +00:00
parent 266db9fa8c
commit afd4454c44
19 changed files with 4589 additions and 469 deletions

View File

@@ -31,6 +31,10 @@
#include <libpri.h>
#include <dahdi/user.h>
#define SIG_PRI_AOC_GRANT_S (1 << 0)
#define SIG_PRI_AOC_GRANT_D (1 << 1)
#define SIG_PRI_AOC_GRANT_E (1 << 2)
#if defined(HAVE_PRI_CCSS)
/*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
#define SIG_PRI_DEBUG_NORMAL \
@@ -192,6 +196,13 @@ struct sig_pri_chan {
char keypad_digits[AST_MAX_EXTENSION];
#endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
#if defined(HAVE_PRI_AOC_EVENTS)
struct pri_subcmd_aoc_e aoc_e;
int aoc_s_request_invoke_id; /*!< If an AOC-S request was present for the call, this is the invoke_id to use for the response */
unsigned int aoc_s_request_invoke_id_valid:1; /*!< This is set when the AOC-S invoke id is present */
unsigned int waiting_for_aoce:1; /*!< Delaying hangup for AOC-E msg. If this is set and AOC-E is recieved, continue with hangup before timeout period. */
unsigned int holding_aoce:1; /*!< received AOC-E msg from asterisk. holding for disconnect/release */
#endif /* defined(HAVE_PRI_AOC_EVENTS) */
unsigned int inalarm:1;
unsigned int alerting:1; /*!< TRUE if channel is alerting/ringing */
unsigned int alreadyhungup:1; /*!< TRUE if the call has already gone/hungup */
@@ -243,6 +254,12 @@ struct sig_pri_pri {
int facilityenable; /*!< Enable facility IEs */
int dchan_logical_span[SIG_PRI_NUM_DCHANS]; /*!< Logical offset the DCHAN sits in */
int fds[SIG_PRI_NUM_DCHANS]; /*!< FD's for d-channels */
#if defined(HAVE_PRI_AOC_EVENTS)
int aoc_passthrough_flag; /*!< Represents what AOC messages (S,D,E) are allowed to pass-through */
int aoce_delayhangup:1; /*!< defines whether the aoce_delayhangup option is enabled or not */
#endif /* defined(HAVE_PRI_AOC_EVENTS) */
#if defined(HAVE_PRI_SERVICE_MESSAGES)
unsigned int enable_service_message_support:1; /*!< enable SERVICE message support */
#endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */