diff options
author | Alexandr Anikin <may@telecom-service.ru> | 2012-01-26 20:44:37 +0000 |
---|---|---|
committer | Alexandr Anikin <may@telecom-service.ru> | 2012-01-26 20:44:37 +0000 |
commit | 075b8385a076d80112761579b61c9577c69ae2c6 (patch) | |
tree | f5ba1eb723951a853cd3ea84b0c1fe2c855c6884 /addons/chan_ooh323.c | |
parent | f4d98aeb28c11bffda2cd7af90c980a19922849e (diff) |
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
........
Merged revisions 352817 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'addons/chan_ooh323.c')
-rw-r--r-- | addons/chan_ooh323.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 1ed389a05..c2fde1aac 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -858,6 +858,7 @@ static int ooh323_digit_begin(struct ast_channel *chan, char digit) { char dtmf[2]; struct ooh323_pvt *p = (struct ooh323_pvt *) chan->tech_pvt; + int res = 0; if (gH323Debug) ast_verb(0, "--- ooh323_digit_begin\n"); @@ -876,17 +877,21 @@ static int ooh323_digit_begin(struct ast_channel *chan, char digit) 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_verb(0, "+++ ooh323_digit_begin\n"); - return 0; + if (gH323Debug) { + ast_verb(0, "+++ 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_verb(0, "--- ooh323_digit_end\n"); @@ -896,14 +901,19 @@ static int ooh323_digit_end(struct ast_channel *chan, char digit, unsigned int d 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_verb(0, "+++ ooh323_digit_end\n"); - return 0; + if (gH323Debug) { + ast_verb(0, "+++ ooh323_digit_end, res = %d\n", res); + } + + return res; } |