[asterisk-commits] may: branch 10 r352817 - in /branches/10: ./ addons/chan_ooh323.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 26 14:22:09 CST 2012
Author: may
Date: Thu Jan 26 14:22:05 2012
New Revision: 352817
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=352817
Log:
Fix outbound DTMF for inband mode (tell asterisk core to generate DTMF
sounds).
(Closes issue ASTERISK-19233)
Reported by: Matt Behrens
Patches:
chan_ooh323.c.patch uploaded by Matt Behrens (License #6346)
........
Merged revisions 352807 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/addons/chan_ooh323.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/chan_ooh323.c?view=diff&rev=352817&r1=352816&r2=352817
==============================================================================
--- branches/10/addons/chan_ooh323.c (original)
+++ branches/10/addons/chan_ooh323.c Thu Jan 26 14:22:05 2012
@@ -848,6 +848,7 @@
{
char dtmf[2];
struct ooh323_pvt *p = (struct ooh323_pvt *) chan->tech_pvt;
+ int res = 0;
if (gH323Debug)
ast_verbose("--- ooh323_digit_begin\n");
@@ -866,17 +867,21 @@
dtmf[0] = digit;
dtmf[1] = '\0';
ooSendDTMFDigit(p->callToken, dtmf);
+ } else if (p->dtmfmode & H323_DTMF_INBAND) {
+ res = -1; // tell Asterisk to generate inband indications
}
ast_mutex_unlock(&p->lock);
- if (gH323Debug)
- ast_verbose("+++ ooh323_digit_begin\n");
-
- return 0;
+ if (gH323Debug) {
+ ast_verbose("+++ ooh323_digit_begin %d\n", res);
+ }
+
+ return res;
}
static int ooh323_digit_end(struct ast_channel *chan, char digit, unsigned int duration)
{
struct ooh323_pvt *p = (struct ooh323_pvt *) chan->tech_pvt;
+ int res = 0;
if (gH323Debug)
ast_verbose("--- ooh323_digit_end\n");
@@ -886,14 +891,18 @@
return -1;
}
ast_mutex_lock(&p->lock);
- if (p->rtp && ((p->dtmfmode & H323_DTMF_RFC2833) || (p->dtmfmode & H323_DTMF_CISCO)) )
+ if (p->rtp && ((p->dtmfmode & H323_DTMF_RFC2833) || (p->dtmfmode & H323_DTMF_CISCO)) ) {
ast_rtp_instance_dtmf_end(p->rtp, digit);
+ } else if(p->dtmfmode & H323_DTMF_INBAND) {
+ res = -1; // tell Asterisk to stop inband indications
+ }
ast_mutex_unlock(&p->lock);
- if (gH323Debug)
- ast_verbose("+++ ooh323_digit_end\n");
-
- return 0;
+ if (gH323Debug) {
+ ast_verbose("+++ ooh323_digit_end, res = %d\n", res);
+ }
+
+ return res;
}
More information about the asterisk-commits
mailing list