summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-03-05 21:48:32 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-03-05 21:48:32 +0000
commitdda40528ed446ee7e42019bd0d257e181960697c (patch)
tree94ee4d9b203b454c9fbf61e36123c230b1fa5e8d /channels/chan_dahdi.c
parent11bbc097b7d6e115ea413dd80b8deee95ee3dc63 (diff)
Setup DSP when SS7 call is connected or early media is available.
Outgoing SS7 calls fail to detect incoming DTMF so any bridged channel that requires out-of-band DTMF will not work. * Added sig_ss7_open_media() calls at appropriate places in sig_ss7.c. The new call converts conditionaled out unconverted code and shows that the code really did something useful. * Improved some chan_dahdi DTMF debug messages to help track DTMF handling. (closes issue ASTERISK-19312) Reported by: Igor Nikolaev ........ Merged revisions 358260 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358261 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index c4ce90942..21214bd88 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -2637,17 +2637,17 @@ static struct ast_channel *my_new_pri_ast_channel(void *pvt, int state, enum sig
static int set_actual_gain(int fd, float rxgain, float txgain, float rxdrc, float txdrc, int law);
-#if defined(HAVE_PRI)
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
/*!
* \internal
- * \brief Open the PRI channel media path.
+ * \brief Open the PRI/SS7 channel media path.
* \since 1.8
*
* \param p Channel private control structure.
*
* \return Nothing
*/
-static void my_pri_open_media(void *p)
+static void my_pri_ss7_open_media(void *p)
{
struct dahdi_pvt *pvt = p;
int res;
@@ -2686,7 +2686,7 @@ static void my_pri_open_media(void *p)
pvt->dsp_features = 0;
}
}
-#endif /* defined(HAVE_PRI) */
+#endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
#if defined(HAVE_PRI)
/*!
@@ -3422,7 +3422,7 @@ static struct sig_pri_callback dahdi_pri_callbacks =
.module_ref = my_module_ref,
.module_unref = my_module_unref,
.dial_digits = my_pri_dial_digits,
- .open_media = my_pri_open_media,
+ .open_media = my_pri_ss7_open_media,
.ami_channel_event = my_ami_channel_event,
};
#endif /* defined(HAVE_PRI) */
@@ -3586,6 +3586,7 @@ static struct sig_ss7_callback dahdi_ss7_callbacks =
.set_remotelyblocked = my_set_remotelyblocked,
.set_callerid = my_set_callerid,
.set_dnid = my_set_dnid,
+ .open_media = my_pri_ss7_open_media,
};
#endif /* defined(HAVE_SS7) */
@@ -4500,11 +4501,13 @@ static int dahdi_digit_begin(struct ast_channel *chan, char digit)
zo.dialstr[1] = digit;
zo.dialstr[2] = '\0';
if ((res = ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_DIAL, &zo)))
- ast_log(LOG_WARNING, "Couldn't dial digit %c: %s\n", digit, strerror(errno));
+ ast_log(LOG_WARNING, "Channel %s couldn't dial digit %c: %s\n",
+ ast_channel_name(chan), digit, strerror(errno));
else
pvt->dialing = 1;
} else {
- ast_debug(1, "Started VLDTMF digit '%c'\n", digit);
+ ast_debug(1, "Channel %s started VLDTMF digit '%c'\n",
+ ast_channel_name(chan), digit);
pvt->dialing = 1;
pvt->begindigit = digit;
}
@@ -4540,7 +4543,8 @@ static int dahdi_digit_end(struct ast_channel *chan, char digit, unsigned int du
if (pvt->begindigit) {
x = -1;
- ast_debug(1, "Ending VLDTMF digit '%c'\n", digit);
+ ast_debug(1, "Channel %s ending VLDTMF digit '%c'\n",
+ ast_channel_name(chan), digit);
res = ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_SENDTONE, &x);
pvt->dialing = 0;
pvt->begindigit = 0;