[svn-commits] moy: branch moy/dahdi-tap-1.6.2 r270948 - /team/moy/dahdi-tap-1.6.2/channels/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 16 14:18:54 CDT 2010
Author: moy
Date: Wed Jun 16 14:18:50 2010
New Revision: 270948
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=270948
Log:
set the conference law to fix audio problem in E1
Modified:
team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c
Modified: team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c?view=diff&rev=270948&r1=270947&r2=270948
==============================================================================
--- team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c (original)
+++ team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c Wed Jun 16 14:18:50 2010
@@ -4349,6 +4349,7 @@
}
x = 0;
+#ifdef HAVE_PRI
if (p->passivefd != -1) {
struct dahdi_confinfo pinfo;
memset(&pinfo, 0, sizeof(pinfo));
@@ -4360,6 +4361,7 @@
dahdi_close(p->passivefd);
p->passivefd = -1;
}
+#endif
dahdi_confmute(p, 0);
p->muting = 0;
restore_gains(p);
@@ -4381,11 +4383,13 @@
p->channel, idx, p->subs[SUB_REAL].dfd, p->subs[SUB_CALLWAIT].dfd, p->subs[SUB_THREEWAY].dfd);
p->ignoredtmf = 0;
+#ifdef HAVE_PRI
if (p->passivepeer) {
p->passivepeer->passivepeer = NULL;
p->passivepeer->owner = NULL;
p->passivepeer = NULL;
}
+#endif
if (idx > -1) {
/* Real channel, do some fixup */
@@ -6938,8 +6942,9 @@
ast_mutex_unlock(&p->lock); \
return f; \
}
+#ifdef HAVE_PRI
if (p->passivefd == -1) {
- /* do normal reading */
+ /* no tapping, do normal reading */
res = read(p->subs[idx].dfd, readbuf, p->subs[idx].linear ? READ_SIZE * 2 : READ_SIZE);
} else {
/* passive channel reading */
@@ -6951,6 +6956,10 @@
/* now read the mixed audio that will be returned to the core */
res = read(p->passivefd, readbuf, p->subs[idx].linear ? READ_SIZE * 2 : READ_SIZE);
}
+#else
+ /* do normal reading */
+ res = read(p->subs[idx].dfd, readbuf, p->subs[idx].linear ? READ_SIZE * 2 : READ_SIZE);
+#endif
ast_clear_flag(ast, AST_FLAG_BLOCKING);
/* Check for hangup */
CHECK_READ_RESULT(res);
@@ -7134,9 +7143,11 @@
return -1;
}
+#ifdef HAVE_PRI
if (p->passivepeer) {
return 0;
}
+#endif
#if 0
#ifdef HAVE_PRI
@@ -12654,6 +12665,17 @@
ast_hangup(c);
break;
}
+
+ /* set the conference law */
+ if (dahdi_setlaw(fd, law)) {
+ ast_log(LOG_ERROR, "Unable to set law %d for the tapping conference\n", law);
+ ast_mutex_unlock(&peerpvt->lock);
+ ast_mutex_unlock(&masterpvt->lock);
+ ast_hangup(c);
+ break;
+ }
+
+ /* save the conference file descriptor and number */
masterpvt->passiveconf = dahdic.confno;
masterpvt->passivefd = fd;
More information about the svn-commits
mailing list