[asterisk-commits] pcadach: branch pcadach/chan_h323-live r42943 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Sep 14 10:29:38 MST 2006
Author: pcadach
Date: Thu Sep 14 12:29:37 2006
New Revision: 42943
URL: http://svn.digium.com/view/asterisk?rev=42943&view=rev
Log:
Don't try to process inband DTMF if choosed codec isn't compatible with such processing
Modified:
team/pcadach/chan_h323-live/channels/chan_h323.c
Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=42943&r1=42942&r2=42943&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Thu Sep 14 12:29:37 2006
@@ -191,6 +191,7 @@
int update_rtp_info; /* Configuration of fd's array is pending */
int recvonly; /* Peer isn't wish to receive our voice stream */
int txDtmfDigit; /* DTMF digit being to send to H.323 side */
+ int noInbandDtmf; /* Inband DTMF processing by DSP isn't available */
int connection_established; /* Call got CONNECT message */
struct oh323_pvt *next; /* Next channel in list */
} *iflist = NULL;
@@ -735,12 +736,17 @@
}
/* Do in-band DTMF detection */
if ((pvt->options.dtmfmode & H323_DTMF_INBAND) && pvt->vad) {
- if (!ast_channel_trylock(pvt->owner)) {
- f = ast_dsp_process(pvt->owner, pvt->vad, f);
- ast_channel_unlock(pvt->owner);
+ if ((pvt->nativeformats & (AST_FORMAT_SLINEAR | AST_FORMAT_ALAW | AST_FORMAT_ULAW))) {
+ if (!ast_channel_trylock(pvt->owner)) {
+ f = ast_dsp_process(pvt->owner, pvt->vad, f);
+ ast_channel_unlock(pvt->owner);
+ }
+ else
+ ast_log(LOG_NOTICE, "Unable to process inband DTMF while channel is locked\n");
+ } else if (pvt->nativeformats && !pvt->noInbandDtmf) {
+ ast_log(LOG_NOTICE, "Inband DTMF is not supported on codec %s. Use RFC2833\n", ast_getformatname(f->subclass));
+ pvt->noInbandDtmf = 1;
}
- else
- ast_log(LOG_NOTICE, "Unable to process inband DTMF while channel is locked\n");
if (f &&(f->frametype == AST_FRAME_DTMF)) {
if (h323debug)
ast_log(LOG_DTMF, "Received in-band digit %c.\n", f->subclass);
More information about the asterisk-commits
mailing list