diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-01-04 16:38:28 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-01-04 16:38:28 +0000 |
commit | 90177fe708cf2068b6b29f99f708760eb2859066 (patch) | |
tree | bca0002a7ada0b454ea6b331a9ed928b2cad99eb /channels/chan_dahdi.c | |
parent | 9be73e35de3ff7455063db96326c351b65dc52fa (diff) |
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
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 0b8261c8c..9010e3384 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -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.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)); + pris[span].pri.moh_signaling = conf->pri.pri.moh_signaling; pris[span].pri.resetinterval = conf->pri.pri.resetinterval; 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")) { confp->pri.pri.hold_disconnect_transfer = ast_true(v->value); #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) } else if (!strcasecmp(v->name, "cc_ptmp_recall_mode")) { if (!strcasecmp(v->value, "global")) { |