[Asterisk-cvs] zaptel wcfxs.c,1.68,1.69
jim at lists.digium.com
jim at lists.digium.com
Mon May 31 18:42:42 CDT 2004
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv10763
Modified Files:
wcfxs.c
Log Message:
Added DPO (Loop Closure/E&M) signalling support and fixed loop detect debounce for FXS/DPO module
Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxs.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- wcfxs.c 28 May 2004 16:16:44 -0000 1.68
+++ wcfxs.c 31 May 2004 22:58:37 -0000 1.69
@@ -1339,7 +1339,7 @@
hook = (res & 1);
if (hook != wc->mod.fxs.lastrxhook[card]) {
/* Reset the debounce (must be multiple of 4ms) */
- wc->mod.fxs.debounce[card] = 3 * 4 * 8;
+ wc->mod.fxs.debounce[card] = 8 * (4 * 8);
#if 0
printk("Resetting debounce card %d hook %d, %d\n", card, hook, wc->mod.fxs.debounce[card]);
#endif
@@ -1512,6 +1512,7 @@
switch(txsig) {
case ZT_TXSIG_ONHOOK:
switch(chan->sig) {
+ case ZT_SIG_EM:
case ZT_SIG_FXOKS:
case ZT_SIG_FXOLS:
wc->mod.fxs.lasttxhook[chan->chanpos-1] = wc->mod.fxs.idletxhookstate[chan->chanpos-1];
@@ -1522,7 +1523,14 @@
}
break;
case ZT_TXSIG_OFFHOOK:
- wc->mod.fxs.lasttxhook[chan->chanpos-1] = wc->mod.fxs.idletxhookstate[chan->chanpos-1];
+ switch(chan->sig) {
+ case ZT_SIG_EM:
+ wc->mod.fxs.lasttxhook[chan->chanpos-1] = 5;
+ break;
+ default:
+ wc->mod.fxs.lasttxhook[chan->chanpos-1] = wc->mod.fxs.idletxhookstate[chan->chanpos-1];
+ break;
+ }
break;
case ZT_TXSIG_START:
wc->mod.fxs.lasttxhook[chan->chanpos-1] = 4;
@@ -1552,7 +1560,7 @@
wc->span.deflaw = ZT_LAW_MULAW;
for (x=0;x<wc->cards;x++) {
sprintf(wc->chans[x].name, "WCTDM/%d/%d", wc->pos, x);
- wc->chans[x].sigcap = ZT_SIG_FXOKS | ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_SF;
+ wc->chans[x].sigcap = ZT_SIG_FXOKS | ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_SF | ZT_SIG_EM;
wc->chans[x].sigcap |= ZT_SIG_FXSKS | ZT_SIG_FXSLS | ZT_SIG_SF;
wc->chans[x].chanpos = x+1;
wc->chans[x].pvt = wc;
@@ -1584,7 +1592,7 @@
if (wc->modtype[x] == MOD_TYPE_FXO)
wc->chans[x].sigcap = ZT_SIG_FXSKS | ZT_SIG_FXSLS | ZT_SIG_SF;
else
- wc->chans[x].sigcap = ZT_SIG_FXOKS | ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_SF;
+ wc->chans[x].sigcap = ZT_SIG_FXOKS | ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_SF | ZT_SIG_EM;
}
}
}
@@ -1684,7 +1692,7 @@
/* Init with Auto Calibration */
if (!(ret=wcfxs_init_proslic(wc, x, 0, 0, sane))) {
wc->cardflag |= (1 << x);
- printk("Module %d: Installed -- AUTO FXS\n",x);
+ printk("Module %d: Installed -- AUTO FXS/DPO\n",x);
} else {
if(ret!=-2) {
sane=1;
More information about the svn-commits
mailing list