Initial import from FreeBSD RELENG_4:
[games.git] / usr.sbin / i4b / man / i4btel.4
1 .\"
2 .\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\"     $Id: i4btel.4,v 1.9 1999/12/13 22:11:55 hm Exp $
26 .\"
27 .\" $FreeBSD: src/usr.sbin/i4b/man/i4btel.4,v 1.8.2.6 2003/03/13 03:10:59 trhodes Exp $
28 .\"
29 .\"     last edit-date: [Mon Dec 13 23:13:39 1999]
30 .\"
31 .Dd April 21, 1999
32 .Dt I4BTEL 4
33 .Os
34 .Sh NAME
35 .Nm i4btel
36 .Nd isdn4bsd ISDN B-channel telephony interface driver
37 .Sh FreeBSD SYNOPSIS
38 .Cd pseudo-device \&"i4btel\&" Op count
39 .Sh NetBSD SYNOPSIS
40 none
41 .Sh DESCRIPTION
42 The
43 .Nm
44 driver provides an interface to the B-channel for telephony applications
45 and is currently used by the
46 .Xr isdnd 8
47 for answering machine support. The driver is part of the isdn4bsd package.
48 .Pp
49 The lower six bits of the drivers's minor number is used to specify a
50 unit number, whereas the upper two bits specify a functionality.
51 .Pp
52 Functionality zero is the usual telephony data stream i/o driver.
53 .Pp
54 Functionality one is used to enable commands to dial out and hang up and
55 receive responses about the state of the dial out progress and status.
56 This commands may change in the future, for details see the file
57 .Em i4b_tel_ioctl.h
58 and the
59 .Xr isdnphone 1
60 utility.
61 .Pp
62 The telephony data stream comes out of the line in a bit-reversed format,
63 so the
64 .Nm
65 driver does the bit-reversion process in any case.
66 .Pp
67 Additionally, the user can specify to do A-law to u-law, u-law to A-law
68 or no conversion at all in the i4btel driver by using the
69 .Xr isdntelctl 8
70 utility.
71 .Pp
72 The driver is able to process several ioctl's:
73 .Pp
74 .Bl -tag -width Ds -compact -offset indent
75 .It Ar I4B_TEL_GETAUDIOFMT
76 get currently used audio format conversion.
77 .It Ar I4B_TEL_SETAUDIOFMT
78 set currently used audio format conversion.
79 .It Ar I4B_TEL_EMPTYINPUTQUEUE
80 clear the input queue.
81 .El
82 .Pp
83 For the I4B_TEL_GETAUDIOFMT and I4B_TEL_SETAUDIOFMT, the following
84 parameters are available:
85 .Pp
86 .Bl -tag -width Ds -compact -offset indent
87 .It Ar CVT_NONE
88 do no A-law/u-law audio format conversion.
89 The conversion path looks like this:
90 .Pp
91 USER <--> bitreversing <--> ISDN-line
92 .Pp
93 .It Ar CVT_ALAW2ULAW
94 set set audio format conversion to do an audio conversion from A-law
95 (on the ISDN line) to u-law (in the userland).
96 The
97 .Xr read 2
98 conversion path looks like this:
99 .Pp
100 USER <-- u-law/A-law <-- bitreversing <-- ISDN-line
101 .Pp
102 and the
103 .Xr write 2
104 conversion path looks like this:
105 .Pp
106 USER --> u-law/A-law --> bitreversing --> ISDN-line
107 .Pp
108 .It Ar CVT_ULAW2ALAW
109 set set audio format conversion to do an audio conversion from u-law
110 (on the ISDN line) to A-law (in the userland).
111 The
112 .Xr read 2
113 conversion path looks like this:
114 .Pp
115 USER <-- A-law/u-law <-- bitreversing <-- ISDN-line
116 .Pp
117 and the
118 .Xr write 2
119 conversion path looks like this:
120 .Pp
121 USER --> A-law/u-law --> bitreversing --> ISDN-line
122 .Pp
123 .El
124 .Sh STANDARDS
125 A-Law and u-Law are specified in ITU Recommendation G.711.
126 .Sh SEE ALSO
127 .Xr g711conv 1 ,
128 .Xr isdnphone 1 ,
129 .Xr isdnd.rc 5 ,
130 .Xr isdnd 8 ,
131 .Xr isdntelctl 8
132 .Sh AUTHORS
133 The
134 .Nm
135 device driver and this manpage were written by
136 .An Hellmuth Michaelis Aq hm@FreeBSD.org .