Add to chan_dahdi ISDN HOLD, Call deflection, and keypad facility support.

* 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)}
* Added support for BRI PTMP NT mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2009-10-23 16:57:33 +00:00
parent 52a2ded0cd
commit cff6d02b53
8 changed files with 1890 additions and 113 deletions

View File

@@ -76,6 +76,7 @@ struct sig_pri_callback {
void (* const set_dnid)(void *pvt, const char *dnid);
void (* const set_rdnis)(void *pvt, const char *rdnis);
void (* const queue_control)(void *pvt, int subclass);
int (* const new_nobch_intf)(struct sig_pri_pri *pri);
};
#define NUM_DCHANS 4 /*!< No more than 4 d-channels */
@@ -144,6 +145,10 @@ struct sig_pri_chan {
/* Internal variables -- Don't touch */
/* Probably will need DS0 number, DS1 number, and a few other things */
char dialdest[256]; /* Queued up digits for overlap dialing. They will be sent out as information messages when setup ACK is received */
#if defined(HAVE_PRI_SETUP_KEYPAD)
/*! \brief Keypad digits that came in with the SETUP message. */
char keypad_digits[AST_MAX_EXTENSION];
#endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
unsigned int alerting:1; /*!< TRUE if channel is alerting/ringing */
unsigned int alreadyhungup:1; /*!< TRUE if the call has already gone/hungup */
@@ -155,6 +160,8 @@ struct sig_pri_chan {
unsigned int outgoing:1;
unsigned int digital:1;
/*! \brief TRUE if this interface has no B channel. (call hold and call waiting) */
unsigned int no_b_channel:1;
struct ast_channel *owner;
@@ -187,6 +194,10 @@ struct sig_pri_pri {
#ifdef HAVE_PRI_INBANDDISCONNECT
unsigned int inbanddisconnect:1; /*!< Should we support inband audio after receiving DISCONNECT? */
#endif
#if defined(HAVE_PRI_CALL_HOLD)
/*! \brief TRUE if held calls are transferred on disconnect. */
unsigned int hold_disconnect_transfer:1;
#endif /* defined(HAVE_PRI_CALL_HOLD) */
int dialplan; /*!< Dialing plan */
int localdialplan; /*!< Local dialing plan */
char internationalprefix[10]; /*!< country access code ('00' for european dialplans) */
@@ -217,6 +228,16 @@ struct sig_pri_pri {
/* Everything after here is internally set */
struct pri *dchans[NUM_DCHANS]; /*!< Actual d-channels */
struct pri *pri; /*!< Currently active D-channel */
/*!
* List of private structures of the user of this module for no B channel
* interfaces. (hold and call waiting interfaces)
*/
void *no_b_chan_iflist;
/*!
* List of private structures of the user of this module for no B channel
* interfaces. (hold and call waiting interfaces)
*/
void *no_b_chan_end;
int numchans; /*!< Num of channels we represent */
struct sig_pri_chan *pvts[MAX_CHANNELS]; /*!< Member channel pvt structs */
pthread_t master; /*!< Thread of master */