summaryrefslogtreecommitdiff
path: root/wcfxs.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-11-23 23:09:46 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-11-23 23:09:46 +0000
commit83cdd96c6b999f327aab0c8fbbf1a4eed7d36076 (patch)
treeedd69a1a2d7ea4ce8fdc456af64006a1bc3b9c00 /wcfxs.c
parent786f3d3556dde4fd88c35e841c545b6ec47c4eda (diff)
Supply on hook transfer
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@284 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-xwcfxs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wcfxs.c b/wcfxs.c
index 165d823..caa2666 100755
--- a/wcfxs.c
+++ b/wcfxs.c
@@ -1047,6 +1047,17 @@ static int wcfxs_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat
wcfxs_setreg(wc, chan->chanpos - 1, regop.reg, regop.val);
}
break;
+ case ZT_ONHOOKTRANSFER:
+ if (copy_from_user(&x, (int *)data, sizeof(x)))
+ return -EFAULT;
+ /* RINGing, prepare for OHT */
+ wc->ohttimer[x] = x << 3;
+ wc->idletxhookstate[chan->chanpos - 1] = 0x2; /* OHT mode when idle */
+ if (!wc->lasttxhook[chan->chanpos - 1]) {
+ wc->lasttxhook[chan->chanpos-1] = wc->idletxhookstate[chan->chanpos-1];
+ wcfxs_setreg(wc, chan->chanpos - 1, 64, wc->lasttxhook[chan->chanpos-1]);
+ }
+ break;
default:
return -ENOTTY;
}