[asterisk-commits] pcadach: trunk r53885 - in /trunk: ./
channels/chan_h323.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Feb 10 02:23:10 MST 2007
Author: pcadach
Date: Sat Feb 10 03:23:09 2007
New Revision: 53885
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53885
Log:
Merged revisions 53881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r53881 | pcadach | 2007-02-10 01:09:49 -0800 (Сбт, 10 Фев 2007) | 1 line
Fix VLDTMF reception
........
Modified:
trunk/ (props changed)
trunk/channels/chan_h323.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_h323.c?view=diff&rev=53885&r1=53884&r2=53885
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Sat Feb 10 03:23:09 2007
@@ -367,6 +367,7 @@
.frametype = AST_FRAME_DTMF_END,
.subclass = pvt->newdigit,
.samples = pvt->newduration * 8,
+ .len = pvt->newduration,
.src = "UPDATE_INFO",
};
if (pvt->newdigit == ' ') { /* signalUpdate message */
@@ -561,14 +562,14 @@
if (pvt->rtp && (pvt->options.dtmfmode & H323_DTMF_RFC2833) && ((pvt->dtmf_pt[0] > 0) || (pvt->dtmf_pt[0] > 0))) {
/* out-of-band DTMF */
if (h323debug) {
- ast_log(LOG_DTMF, "End sending out-of-band digit %c on %s\n", digit, c->name);
+ ast_log(LOG_DTMF, "End sending out-of-band digit %c on %s, duration %d\n", digit, c->name, duration);
}
ast_rtp_senddigit_end(pvt->rtp, digit);
ast_mutex_unlock(&pvt->lock);
} else {
/* in-band DTMF */
if (h323debug) {
- ast_log(LOG_DTMF, "End sending inband digit %c on %s\n", digit, c->name);
+ ast_log(LOG_DTMF, "End sending inband digit %c on %s, duration %d\n", digit, c->name, duration);
}
pvt->txDtmfDigit = ' ';
token = pvt->cd.call_token ? strdup(pvt->cd.call_token) : NULL;
@@ -1847,6 +1848,7 @@
.frametype = AST_FRAME_DTMF_END,
.subclass = digit,
.samples = duration * 8,
+ .len = duration,
.src = "SEND_DIGIT",
};
if (digit == ' ') { /* signalUpdate message */
@@ -1856,10 +1858,20 @@
pvt->DTMFsched = -1;
}
} else { /* Regular input or signal message */
+ if (pvt->DTMFsched >= 0) {
+ /* We still don't send DTMF END from previous event, send it now */
+ ast_sched_del(sched, pvt->DTMFsched);
+ pvt->DTMFsched = -1;
+ f.subclass = pvt->curDTMF;
+ f.samples = f.len = 0;
+ ast_queue_frame(pvt->owner, &f);
+ /* Restore values */
+ f.subclass = digit;
+ f.samples = duration * 8;
+ f.len = duration;
+ }
if (duration) { /* This is a signal, signalUpdate follows */
f.frametype = AST_FRAME_DTMF_BEGIN;
- if (pvt->DTMFsched >= 0)
- ast_sched_del(sched, pvt->DTMFsched);
pvt->DTMFsched = ast_sched_add(sched, duration, oh323_simulate_dtmf_end, pvt);
if (h323debug)
ast_log(LOG_DTMF, "Scheduled DTMF END simulation for %d ms, id=%d\n", duration, pvt->DTMFsched);
@@ -2454,6 +2466,8 @@
if (h323debug) {
int i;
for (i = 0; i < 32; ++i) {
+ if (!prefs->order[i])
+ break;
ast_log(LOG_DEBUG, "prefs[%d]=%s:%d\n", i, (prefs->order[i] ? ast_getformatname(1 << (prefs->order[i]-1)) : "<none>"), prefs->framing[i]);
}
}
More information about the asterisk-commits
mailing list