summaryrefslogtreecommitdiff
path: root/xpp/card_fxs.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-06 08:24:41 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-06 08:24:41 +0000
commit78c015ad276be368cc19e50c6d7a9754c0758c00 (patch)
treeb9941b22f1eee73d00d41f7ca9dcc863c50d93fe /xpp/card_fxs.c
parent3657d8f829223072c78d8054f325ef0ac134cc18 (diff)
Cleanup the unused non-RBS code:
* remove all non WITH_RBS code. No need for the define. * unused recv_errors and seq_errors. * CID_START_TICKS, CID_STOP_TICKS cid_timer from trunk/ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1411 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/card_fxs.c')
-rw-r--r--xpp/card_fxs.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/xpp/card_fxs.c b/xpp/card_fxs.c
index ec7192e..d5ade7b 100644
--- a/xpp/card_fxs.c
+++ b/xpp/card_fxs.c
@@ -325,17 +325,8 @@ static int FXS_card_init(xbus_t *xbus, xpd_t *xpd)
/*
* Setup ring timers
*/
-#ifdef WITH_RBS
/* Software controled ringing (for CID) */
ret = SLIC_DIRECT_REQUEST(xbus, xpd, ALL_LINES, 0x22, 0x00); /* Ringing Oscilator Control */
-#else
- /* Hardware controled ringing (no CID) */
- ret += SLIC_DIRECT_REQUEST(xbus, xpd, ALL_LINES, 0x30, 0x80); /* Active timer low byte */
- ret += SLIC_DIRECT_REQUEST(xbus, xpd, ALL_LINES, 0x31, 0x3E); /* Active timer high byte */
- ret += SLIC_DIRECT_REQUEST(xbus, xpd, ALL_LINES, 0x32, 0x80); /* Inactive timer low byte */
- ret += SLIC_DIRECT_REQUEST(xbus, xpd, ALL_LINES, 0x33, 0x3E); /* Inactive timer high byte */
- ret += SLIC_DIRECT_REQUEST(xbus, xpd, ALL_LINES, 0x22, 0x18); /* Ringing Oscilator Control */
-#endif
if(ret < 0)
goto err;
DBG("%s/%s: done\n", xbus->busname, xpd->xpdname);
@@ -417,7 +408,6 @@ static int FXS_card_zaptel_postregistration(xpd_t *xpd, bool on)
return 0;
}
-#ifdef WITH_RBS
int FXS_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, zt_txsig_t txsig)
{
int ret = 0;
@@ -489,74 +479,6 @@ int FXS_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, zt_txsig_t txsig)
return ret;
}
-#else
-int FXS_card_sethook(xbus_t *xbus, xpd_t *xpd, int pos, int hookstate)
-{
- int ret = 0;
-
- DBG("%s/%s/%d: %s\n", xbus->busname, xpd->xpdname, pos, hookstate2str(hookstate));
- switch(hookstate) {
- /* On-hook, off-hook: The PBX is playing a phone on an FXO line.
- * Can be ignored for an FXS line
- */
- case ZT_ONHOOK:
- if(IS_SET(xpd->digital_inputs, pos)) {
- NOTICE("%s: Trying to ONHOOK a digital input channel %d. Ignoring\n", __FUNCTION__, pos);
- ret = -EINVAL;
- break;
- }
- if(IS_SET(xpd->digital_outputs, pos)) {
- DBG("%s/%s/%d: digital output OFF\n", xbus->busname, xpd->xpdname, pos);
- ret = CALL_XMETHOD(RELAY_OUT, xpd->xbus, xpd, pos-8, 0);
- break;
- }
- xpd->ringing[pos] = 0;
- DBG("%s/%s/%d: stop ringing\n", xbus->busname, xpd->xpdname, pos);
-#if 1 // FIXME: Not needed -- verify
- ret = CALL_XMETHOD(RING, xbus, xpd, pos, 0); // RING off
-#endif
- if(ret) {
- DBG("ZT_ONHOOK(stop ring) Failed: ret=0x%02X\n", ret);
- break;
- }
- break;
- case ZT_START:
- DBG("%s/%s/%d: fall through ZT_OFFHOOK\n", xbus->busname, xpd->xpdname, pos);
- // Fall through
- case ZT_OFFHOOK:
- DBG("%s/%s/%d: ZT_OFFHOOK (ignoring for PHONES)\n", xbus->busname, xpd->xpdname, pos);
- break;
- case ZT_WINK:
- WARN("No code yet\n");
- break;
- case ZT_FLASH:
- WARN("No code yet\n");
- break;
- case ZT_RING:
- DBG("%s/%s/%d: ZT_RING: %d\n", xbus->busname, xpd->xpdname, pos, xpd->ringing[pos]);
- if(IS_SET(xpd->digital_inputs, pos)) {
- NOTICE("%s: Trying to RING a digital input channel %d. Ignoring\n", __FUNCTION__, pos);
- return -EINVAL;
- }
- if(IS_SET(xpd->digital_outputs, pos)) {
- DBG("%s/%s/%d: digital output ON\n", xbus->busname, xpd->xpdname, pos);
- ret = CALL_XMETHOD(RELAY_OUT, xpd->xbus, xpd, pos-8, 1);
- return ret;
- }
- xpd->ringing[pos] = 1;
- ret = CALL_XMETHOD(RING, xbus, xpd, pos, 1); // RING on
- if(ret) {
- DBG("ZT_RING Failed: ret=0x%02X\n", ret);
- }
- break;
- case ZT_RINGOFF:
- WARN("No code yet\n");
- break;
- }
- return ret;
-}
-#endif
-
/*
* INPUT polling is done via SLIC register 0x06 (same as LEDS):
* 7 6 5 4 3 2 1 0
@@ -853,11 +775,7 @@ xproto_table_t PROTO_TABLE(FXS) = {
.card_remove = FXS_card_remove,
.card_zaptel_preregistration = FXS_card_zaptel_preregistration,
.card_zaptel_postregistration = FXS_card_zaptel_postregistration,
-#ifdef WITH_RBS
.card_hooksig = FXS_card_hooksig,
-#else
- .card_sethook = FXS_card_sethook,
-#endif
.card_tick = FXS_card_tick,
.RING = XPROTO_CALLER(FXS, RING),