[asterisk-commits] pcadach: branch pcadach/chan_h323-live r42942 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Sep 14 10:20:04 MST 2006
Author: pcadach
Date: Thu Sep 14 12:20:04 2006
New Revision: 42942
URL: http://svn.digium.com/view/asterisk?rev=42942&view=rev
Log:
Don't duplicate the same DTMF digit to H.323 side if it is being duplicated by Asterisk (by zaptel, for example)
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=42942&r1=42941&r2=42942&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:20:04 2006
@@ -186,10 +186,11 @@
int peercapability; /* Capabilities learned from peer */
int jointcapability; /* Common capabilities for local and remote side */
int dtmf_pt; /* Payload code used for RFC2833 messages */
- int curDTMF; /* DTMF tone being generated */
+ int curDTMF; /* DTMF tone being generated to Asterisk side */
int DTMFsched; /* Scheduler descriptor for DTMF */
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 connection_established; /* Call got CONNECT message */
struct oh323_pvt *next; /* Next channel in list */
} *iflist = NULL;
@@ -495,18 +496,20 @@
}
ast_rtp_senddigit_begin(pvt->rtp, digit);
ast_mutex_unlock(&pvt->lock);
- } else {
+ } else if (pvt->txDtmfDigit != digit) {
/* in-band DTMF */
if (h323debug) {
ast_log(LOG_DTMF, "Begin sending inband digit %c on %s\n", digit, c->name);
}
+ pvt->txDtmfDigit = digit;
token = pvt->cd.call_token ? strdup(pvt->cd.call_token) : NULL;
ast_mutex_unlock(&pvt->lock);
h323_send_tone(token, digit);
if (token) {
free(token);
}
- }
+ } else
+ ast_mutex_unlock(&pvt->lock);
oh323_update_info(c);
return 0;
}
@@ -537,6 +540,7 @@
if (h323debug) {
ast_log(LOG_DTMF, "End sending inband digit %c on %s\n", digit, c->name);
}
+ pvt->txDtmfDigit = ' ';
token = pvt->cd.call_token ? strdup(pvt->cd.call_token) : NULL;
ast_mutex_unlock(&pvt->lock);
h323_send_tone(token, ' ');
More information about the asterisk-commits
mailing list