summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-07-11 15:57:17 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-07-11 15:57:17 +0000
commitb968349e19529572892bcf86baab87b478acc781 (patch)
tree54f0b93a0a552a24ce367c2dde490a759907da4d /channels/chan_dahdi.c
parent65710485e4bcdcd1ce3a8967f6805d4c51b9353d (diff)
Merged revisions 130039 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r130039 | kpfleming | 2008-07-11 10:41:56 -0500 (Fri, 11 Jul 2008) | 4 lines add support for a configuration parameter for 'inband audio during RELEASE', which is currently mandatory in libpri-1.4.4 but will become configurable in libpri-1.4.5 later today (related to issue #13042) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 34162ea5f..bd68addf1 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -416,6 +416,9 @@ struct dahdi_pri {
int span;
int resetting;
int resetpos;
+#ifdef HAVE_PRI_INBANDRELEASE
+ unsigned int inbandrelease:1; /*!< Should we support inband audio after receiving RELEASE? */
+#endif
time_t lastreset; /*!< time when unused channels were last reset */
long resetinterval; /*!< Interval (in seconds) for resetting unused channels */
int sig;
@@ -8447,6 +8450,9 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
pris[span].minunused = conf->pri.minunused;
pris[span].minidle = conf->pri.minidle;
pris[span].overlapdial = conf->pri.overlapdial;
+#ifdef HAVE_PRI_INBANDRELEASE
+ pris[span].inbandrelease = conf->pri.inbandrelease;
+#endif
pris[span].facilityenable = conf->pri.facilityenable;
ast_copy_string(pris[span].idledial, conf->pri.idledial, sizeof(pris[span].idledial));
ast_copy_string(pris[span].idleext, conf->pri.idleext, sizeof(pris[span].idleext));
@@ -11478,6 +11484,9 @@ static int start_pri(struct dahdi_pri *pri)
if (pri->switchtype == PRI_SWITCH_GR303_TMC)
pri->overlapdial |= DAHDI_OVERLAPDIAL_BOTH;
pri_set_overlapdial(pri->dchans[i],(pri->overlapdial & DAHDI_OVERLAPDIAL_OUTGOING)?1:0);
+#ifdef HAVE_PRI_INBANDRELEASE
+ pri_set_inbandrelease(pri->dchans[i], pri->inbandrelease);
+#endif
/* Enslave to master if appropriate */
if (i)
pri_enslave(pri->dchans[0], pri->dchans[i]);
@@ -14286,6 +14295,10 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} else {
confp->pri.overlapdial = DAHDI_OVERLAPDIAL_NONE;
}
+#ifdef HAVE_PRI_INBANDRELEASE
+ } else if (!strcasecmp(v->name, "inbandrelease")) {
+ confp->pri.inbandrelease = ast_true(v->value);
+#endif
} else if (!strcasecmp(v->name, "pritimer")) {
#ifdef PRI_GETSET_TIMERS
char tmp[20], *timerc, *c = tmp;