mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Optional HOLD/RETRIEVE signaling for PTMP TE when the bridge goes on and off hold.
Added the moh_signaling option to specify what to do when the channel's bridged peer puts the ISDN channel on and off of hold. Implemented as a FSM to control libpri ISDN signaling when the bridged peer places the channel on and off of hold with the AST_CONTROL_HOLD and AST_CONTROL_UNHOLD control frames. JIRA SWP-2687 JIRA ABE-2691 Review: https://reviewboard.asterisk.org/r/1063/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
CHANGES
11
CHANGES
@@ -15,23 +15,30 @@
|
|||||||
Asterisk Manager Interface
|
Asterisk Manager Interface
|
||||||
--------------------------
|
--------------------------
|
||||||
* PeerStatus now includes Address and Port.
|
* PeerStatus now includes Address and Port.
|
||||||
|
* Added Hold events for when the remote party puts the call on and off hold
|
||||||
|
for chan_dahdi ISDN channels.
|
||||||
|
|
||||||
Asterisk HTTP Server
|
Asterisk HTTP Server
|
||||||
--------------------------
|
--------------------------
|
||||||
* The HTTP Server can bind to IPv6 addresses.
|
* The HTTP Server can bind to IPv6 addresses.
|
||||||
|
|
||||||
CLI Changes
|
CLI Changes
|
||||||
-----------
|
--------------------------
|
||||||
* New 'gtalk show settings' command showing the current settings loaded from
|
* New 'gtalk show settings' command showing the current settings loaded from
|
||||||
gtalk.conf.
|
gtalk.conf.
|
||||||
* The 'logger reload' command now supports an optional argument, specifying an
|
* The 'logger reload' command now supports an optional argument, specifying an
|
||||||
alternate configuration file to use.
|
alternate configuration file to use.
|
||||||
|
|
||||||
CDR
|
CDR
|
||||||
---
|
--------------------------
|
||||||
* The filter option in cdr_adaptive_odbc now supports negating the argument,
|
* The filter option in cdr_adaptive_odbc now supports negating the argument,
|
||||||
thus allowing records which do NOT match the specified filter.
|
thus allowing records which do NOT match the specified filter.
|
||||||
|
|
||||||
|
libpri channel driver (chan_dahdi) DAHDI changes
|
||||||
|
--------------------------
|
||||||
|
* Added moh_signaling option to specify what to do when the channel's bridged
|
||||||
|
peer puts the ISDN channel on hold.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
|
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
=== versions listed below. These changes may require that
|
=== versions listed below. These changes may require that
|
||||||
=== you modify your configuration files, dialplan or (in
|
=== you modify your configuration files, dialplan or (in
|
||||||
=== some cases) source code if you have your own Asterisk
|
=== some cases) source code if you have your own Asterisk
|
||||||
=== modules or patches. These files also includes advance
|
=== modules or patches. These files also include advance
|
||||||
=== notice of any functionality that has been marked as
|
=== notice of any functionality that has been marked as
|
||||||
=== 'deprecated' and may be removed in a future release,
|
=== 'deprecated' and may be removed in a future release,
|
||||||
=== along with the suggested replacement functionality.
|
=== along with the suggested replacement functionality.
|
||||||
@@ -30,6 +30,9 @@ Gtalk:
|
|||||||
- The default value for 'context' and 'parkinglots' in gtalk.conf has
|
- The default value for 'context' and 'parkinglots' in gtalk.conf has
|
||||||
been changed to 'default', previously they were empty.
|
been changed to 'default', previously they were empty.
|
||||||
|
|
||||||
|
chan_dahdi:
|
||||||
|
- The mohinterpret=passthrough setting is deprecated in favor of
|
||||||
|
moh_signaling=notify.
|
||||||
|
|
||||||
===========================================================
|
===========================================================
|
||||||
===========================================================
|
===========================================================
|
||||||
|
@@ -12283,6 +12283,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
|
|||||||
ast_copy_string(pris[span].pri.localprefix, conf->pri.pri.localprefix, sizeof(pris[span].pri.localprefix));
|
ast_copy_string(pris[span].pri.localprefix, conf->pri.pri.localprefix, sizeof(pris[span].pri.localprefix));
|
||||||
ast_copy_string(pris[span].pri.privateprefix, conf->pri.pri.privateprefix, sizeof(pris[span].pri.privateprefix));
|
ast_copy_string(pris[span].pri.privateprefix, conf->pri.pri.privateprefix, sizeof(pris[span].pri.privateprefix));
|
||||||
ast_copy_string(pris[span].pri.unknownprefix, conf->pri.pri.unknownprefix, sizeof(pris[span].pri.unknownprefix));
|
ast_copy_string(pris[span].pri.unknownprefix, conf->pri.pri.unknownprefix, sizeof(pris[span].pri.unknownprefix));
|
||||||
|
pris[span].pri.moh_signaling = conf->pri.pri.moh_signaling;
|
||||||
pris[span].pri.resetinterval = conf->pri.pri.resetinterval;
|
pris[span].pri.resetinterval = conf->pri.pri.resetinterval;
|
||||||
|
|
||||||
for (x = 0; x < PRI_MAX_TIMERS; x++) {
|
for (x = 0; x < PRI_MAX_TIMERS; x++) {
|
||||||
@@ -17091,6 +17092,19 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
|
|||||||
} else if (!strcasecmp(v->name, "hold_disconnect_transfer")) {
|
} else if (!strcasecmp(v->name, "hold_disconnect_transfer")) {
|
||||||
confp->pri.pri.hold_disconnect_transfer = ast_true(v->value);
|
confp->pri.pri.hold_disconnect_transfer = ast_true(v->value);
|
||||||
#endif /* defined(HAVE_PRI_CALL_HOLD) */
|
#endif /* defined(HAVE_PRI_CALL_HOLD) */
|
||||||
|
} else if (!strcasecmp(v->name, "moh_signaling")
|
||||||
|
|| !strcasecmp(v->name, "moh_signalling")) {
|
||||||
|
if (!strcasecmp(v->value, "moh")) {
|
||||||
|
confp->pri.pri.moh_signaling = SIG_PRI_MOH_SIGNALING_MOH;
|
||||||
|
} else if (!strcasecmp(v->value, "notify")) {
|
||||||
|
confp->pri.pri.moh_signaling = SIG_PRI_MOH_SIGNALING_NOTIFY;
|
||||||
|
#if defined(HAVE_PRI_CALL_HOLD)
|
||||||
|
} else if (!strcasecmp(v->value, "hold")) {
|
||||||
|
confp->pri.pri.moh_signaling = SIG_PRI_MOH_SIGNALING_HOLD;
|
||||||
|
#endif /* defined(HAVE_PRI_CALL_HOLD) */
|
||||||
|
} else {
|
||||||
|
confp->pri.pri.moh_signaling = SIG_PRI_MOH_SIGNALING_MOH;
|
||||||
|
}
|
||||||
#if defined(HAVE_PRI_CCSS)
|
#if defined(HAVE_PRI_CCSS)
|
||||||
} else if (!strcasecmp(v->name, "cc_ptmp_recall_mode")) {
|
} else if (!strcasecmp(v->name, "cc_ptmp_recall_mode")) {
|
||||||
if (!strcasecmp(v->value, "global")) {
|
if (!strcasecmp(v->value, "global")) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -83,6 +83,67 @@ enum sig_pri_law {
|
|||||||
SIG_PRI_ALAW
|
SIG_PRI_ALAW
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum sig_pri_moh_signaling {
|
||||||
|
/*! Generate MOH to the remote party. */
|
||||||
|
SIG_PRI_MOH_SIGNALING_MOH,
|
||||||
|
/*! Send hold notification signaling to the remote party. */
|
||||||
|
SIG_PRI_MOH_SIGNALING_NOTIFY,
|
||||||
|
#if defined(HAVE_PRI_CALL_HOLD)
|
||||||
|
/*! Use HOLD/RETRIEVE signaling to release the B channel while on hold. */
|
||||||
|
SIG_PRI_MOH_SIGNALING_HOLD,
|
||||||
|
#endif /* defined(HAVE_PRI_CALL_HOLD) */
|
||||||
|
};
|
||||||
|
|
||||||
|
enum sig_pri_moh_state {
|
||||||
|
/*! Bridged peer has not put us on hold. */
|
||||||
|
SIG_PRI_MOH_STATE_IDLE,
|
||||||
|
/*! Bridged peer has put us on hold and we were to notify the remote party. */
|
||||||
|
SIG_PRI_MOH_STATE_NOTIFY,
|
||||||
|
/*! Bridged peer has put us on hold and we were to play MOH or HOLD/RETRIEVE fallback. */
|
||||||
|
SIG_PRI_MOH_STATE_MOH,
|
||||||
|
#if defined(HAVE_PRI_CALL_HOLD)
|
||||||
|
/*! Requesting to put channel on hold. */
|
||||||
|
SIG_PRI_MOH_STATE_HOLD_REQ,
|
||||||
|
/*! Trying to go on hold when bridged peer requested to unhold. */
|
||||||
|
SIG_PRI_MOH_STATE_PEND_UNHOLD,
|
||||||
|
/*! Channel is held. */
|
||||||
|
SIG_PRI_MOH_STATE_HOLD,
|
||||||
|
/*! Requesting to take channel out of hold. */
|
||||||
|
SIG_PRI_MOH_STATE_RETRIEVE_REQ,
|
||||||
|
/*! Trying to take channel out of hold when bridged peer requested to hold. */
|
||||||
|
SIG_PRI_MOH_STATE_PEND_HOLD,
|
||||||
|
/*! Failed to take the channel out of hold. No B channels were available? */
|
||||||
|
SIG_PRI_MOH_STATE_RETRIEVE_FAIL,
|
||||||
|
#endif /* defined(HAVE_PRI_CALL_HOLD) */
|
||||||
|
|
||||||
|
/*! Number of MOH states. Must be last in enum. */
|
||||||
|
SIG_PRI_MOH_STATE_NUM
|
||||||
|
};
|
||||||
|
|
||||||
|
enum sig_pri_moh_event {
|
||||||
|
/*! Reset the MOH state machine. (Because of hangup.) */
|
||||||
|
SIG_PRI_MOH_EVENT_RESET,
|
||||||
|
/*! Bridged peer placed this channel on hold. */
|
||||||
|
SIG_PRI_MOH_EVENT_HOLD,
|
||||||
|
/*! Bridged peer took this channel off hold. */
|
||||||
|
SIG_PRI_MOH_EVENT_UNHOLD,
|
||||||
|
#if defined(HAVE_PRI_CALL_HOLD)
|
||||||
|
/*! The hold request was successfully acknowledged. */
|
||||||
|
SIG_PRI_MOH_EVENT_HOLD_ACK,
|
||||||
|
/*! The hold request was rejected. */
|
||||||
|
SIG_PRI_MOH_EVENT_HOLD_REJ,
|
||||||
|
/*! The unhold request was successfully acknowledged. */
|
||||||
|
SIG_PRI_MOH_EVENT_RETRIEVE_ACK,
|
||||||
|
/*! The unhold request was rejected. */
|
||||||
|
SIG_PRI_MOH_EVENT_RETRIEVE_REJ,
|
||||||
|
/*! The remote party took this channel off hold. */
|
||||||
|
SIG_PRI_MOH_EVENT_REMOTE_RETRIEVE_ACK,
|
||||||
|
#endif /* defined(HAVE_PRI_CALL_HOLD) */
|
||||||
|
|
||||||
|
/*! Number of MOH events. Must be last in enum. */
|
||||||
|
SIG_PRI_MOH_EVENT_NUM
|
||||||
|
};
|
||||||
|
|
||||||
struct sig_pri_span;
|
struct sig_pri_span;
|
||||||
|
|
||||||
struct sig_pri_callback {
|
struct sig_pri_callback {
|
||||||
@@ -201,6 +262,9 @@ struct sig_pri_chan {
|
|||||||
/*! \brief Keypad digits that came in with the SETUP message. */
|
/*! \brief Keypad digits that came in with the SETUP message. */
|
||||||
char keypad_digits[AST_MAX_EXTENSION];
|
char keypad_digits[AST_MAX_EXTENSION];
|
||||||
#endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
|
#endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
|
||||||
|
/*! Music class suggested with AST_CONTROL_HOLD. */
|
||||||
|
char moh_suggested[MAX_MUSICCLASS];
|
||||||
|
enum sig_pri_moh_state moh_state;
|
||||||
|
|
||||||
#if defined(HAVE_PRI_AOC_EVENTS)
|
#if defined(HAVE_PRI_AOC_EVENTS)
|
||||||
struct pri_subcmd_aoc_e aoc_e;
|
struct pri_subcmd_aoc_e aoc_e;
|
||||||
@@ -330,6 +394,7 @@ struct sig_pri_span {
|
|||||||
char localprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
|
char localprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
|
||||||
char privateprefix[20]; /*!< for private dialplans */
|
char privateprefix[20]; /*!< for private dialplans */
|
||||||
char unknownprefix[20]; /*!< for unknown dialplans */
|
char unknownprefix[20]; /*!< for unknown dialplans */
|
||||||
|
enum sig_pri_moh_signaling moh_signaling;
|
||||||
long resetinterval; /*!< Interval (in seconds) for resetting unused channels */
|
long resetinterval; /*!< Interval (in seconds) for resetting unused channels */
|
||||||
#if defined(HAVE_PRI_MWI)
|
#if defined(HAVE_PRI_MWI)
|
||||||
/*! \brief Active MWI mailboxes */
|
/*! \brief Active MWI mailboxes */
|
||||||
|
@@ -902,15 +902,22 @@ pickupgroup=1
|
|||||||
;
|
;
|
||||||
;faxbuffers=>6,full
|
;faxbuffers=>6,full
|
||||||
;
|
;
|
||||||
|
; This option specifies what to do when the channel's bridged peer puts the
|
||||||
|
; ISDN channel on hold. Settable per logical ISDN span.
|
||||||
|
; moh: Generate music-on-hold to the remote party.
|
||||||
|
; notify: Send hold notification signaling to the remote party.
|
||||||
|
; For ETSI PTP and ETSI PTMP NT links.
|
||||||
|
; (The notify setting deprecates the mohinterpret=passthrough setting.)
|
||||||
|
; hold: Use HOLD/RETRIEVE signaling to release the B channel while on hold.
|
||||||
|
; For ETSI PTMP TE links.
|
||||||
|
;
|
||||||
|
;moh_signaling=moh
|
||||||
|
;
|
||||||
; This option specifies a preference for which music on hold class this channel
|
; This option specifies a preference for which music on hold class this channel
|
||||||
; should listen to when put on hold if the music class has not been set on the
|
; should listen to when put on hold if the music class has not been set on the
|
||||||
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
|
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
|
||||||
; channel putting this one on hold did not suggest a music class.
|
; channel putting this one on hold did not suggest a music class.
|
||||||
;
|
;
|
||||||
; If this option is set to "passthrough", then the hold message will always be
|
|
||||||
; passed through as signalling instead of generating hold music locally. This
|
|
||||||
; setting is only valid when used on a channel that uses digital signalling.
|
|
||||||
;
|
|
||||||
; This option may be set globally or on a per-channel basis.
|
; This option may be set globally or on a per-channel basis.
|
||||||
;
|
;
|
||||||
;mohinterpret=default
|
;mohinterpret=default
|
||||||
|
Reference in New Issue
Block a user