[zaptel-commits] tzafrir: trunk r1279 - in /trunk/xpp: card_fxo.c
card_fxs.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Wed Aug 9 19:38:43 MST 2006
Author: tzafrir
Date: Wed Aug 9 21:38:43 2006
New Revision: 1279
URL: http://svn.digium.com/view/zaptel?rev=1279&view=rev
Log:
- In SIG_CHANGED only sig_toggles bits are interesting (was good in FXS,
now fixed in FXO).
- Better DBG messages for SIG_CHANGED (FXS and FXO).
- Start work on new RING logic (for FXO caller id).
Modified:
trunk/xpp/card_fxo.c
trunk/xpp/card_fxs.c
Modified: trunk/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/card_fxo.c?rev=1279&r1=1278&r2=1279&view=diff
==============================================================================
--- trunk/xpp/card_fxo.c (original)
+++ trunk/xpp/card_fxo.c Wed Aug 9 21:38:43 2006
@@ -560,6 +560,8 @@
pack->datalen = len;
packet_send(xbus, pack);
do_led(xpd, pos, LED_GREEN, (offhook)?LED_ON:LED_OFF);
+ if(!offhook)
+ xpd->ringing[pos] = 0;
spin_unlock_irqrestore(&xpd->lock, flags);
return ret;
}
@@ -606,10 +608,18 @@
DBG("%s/%s: (PSTN) sig_toggles=0x%04X sig_status=0x%04X\n", xpd->xbus->busname, xpd->xpdname, sig_toggles, sig_status);
spin_lock_irqsave(&xpd->lock, flags);
for_each_line(xpd, i) {
- if(IS_SET(sig_status, i)) {
- xpd->ringing[i] = 1;
- } else {
- xpd->ringing[i] = 0;
+ if(IS_SET(sig_toggles, i)) {
+ struct zt_chan *chan = &xpd->span.chans[i];
+
+ if(IS_SET(sig_status, i)) {
+ DBG("%s/%s/%d: RING-ON\n", xbus->busname, xpd->xpdname, chan->channo);
+ xpd->ringing[i] = 1;
+ do_led(xpd, i, LED_GREEN, LED_ON);
+ } else {
+ DBG("%s/%s/%d: RING-OFF\n", xbus->busname, xpd->xpdname, chan->channo);
+ xpd->ringing[i] = 0;
+ do_led(xpd, i, LED_GREEN, LED_OFF);
+ }
}
}
spin_unlock_irqrestore(&xpd->lock, flags);
Modified: trunk/xpp/card_fxs.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/card_fxs.c?rev=1279&r1=1278&r2=1279&view=diff
==============================================================================
--- trunk/xpp/card_fxs.c (original)
+++ trunk/xpp/card_fxs.c Wed Aug 9 21:38:43 2006
@@ -781,12 +781,12 @@
do_chan_power(xpd->xbus, xpd, BIT(i), 0); // When not ringing, VBAT is always Low
MARK_BLINK(priv,i,LED_GREEN,0);
if(IS_SET(sig_status, i)) {
- DBG("OFFHOOK: channo=%d\n", chan->channo);
+ DBG("%s/%s/%d: OFFHOOK\n", xbus->busname, xpd->xpdname, chan->channo);
MARK_LED(priv,i,LED_GREEN,LED_ON);
BIT_SET(xpd->hookstate, i);
zt_hooksig(chan, ZT_RXSIG_OFFHOOK);
} else {
- DBG("ONHOOK channo=%d\n", chan->channo);
+ DBG("%s/%s/%d: ONHOOK\n", xbus->busname, xpd->xpdname, chan->channo);
MARK_LED(priv,i,LED_GREEN,LED_OFF);
BIT_CLR(xpd->hookstate, i);
zt_hooksig(chan, ZT_RXSIG_ONHOOK);
More information about the zaptel-commits
mailing list