#sccs "@(#)uts/kern/sys:phone.h 1.4" /* USER LEVEL PHONE IOCTL STRUCTURE */ /* ioctl commands */ #define PIOC ('P'<<8) #define PIOCGETP (PIOC|1) /* get phone line params */ #define PIOCSETP (PIOC|2) /* set phone line params */ #define PIOCOFFHOOK (PIOC|3) /* start call, go offhook */ #define PIOCDIAL (PIOC|4) /* dialling of digits */ #define PIOCFLASH (PIOC|5) /* flash the line */ #define PIOCDISC (PIOC|6) /* disconnect the line */ #define PIOCHOLD (PIOC|7) /* put the line on hold */ #define PIOCUNHOLD (PIOC|8) /* reconnect the line */ #define PIOCLINESEL (PIOC|9) /* select line for offhook */ #define PIOCRECONN (PIOC|10) /* reconn line for more dialling */ #define PIOCOVSPD (PIOC|11) /* 2.3% character overspeed */ #define PIOC1800 (PIOC|12) /* 1800 Hz gurad tone CCITT */ #define PIOC2100 (PIOC|13) /* 2100 Hz European ans tone CCITT*/ #define PIOCAFTONE (PIOC|14) /* DSR to turn on after silent CCITT*/ #define PIOCANSTONE (PIOC|15) /* PSK unscrambed mark at1200 CCITT */ #define PIOCHKSTATUS (PIOC|16) /* check on/off hook during bootup */ /* device files */ #define PHDEV "/dev/ph" /* phone line devices */ struct updata /* user parameter */ { char c_lineparam; /* set line states */ char c_waitdialtone; /* timeout value */ unsigned short c_linestatus; /* line status, read only.*/ unsigned short c_feedback; /* controls dialer */ unsigned short c_waitflash; /* duration of flash */ }; /* c_lineparam, sets the line usage and dial methods */ #define VOICE 0x01 /* Read Only,indicate voice only*/ #define DATA 0x02 /* RO,mutually exclusive with voice*/ #define DTMF 0x04 /* use DTMF only */ #define PULSE 0x08 /* use pulse only, if both bits */ /* are set, DTMF will be tried */ /* first, then pulse. */ #define INCMNG 0x10 /* set to accept incoming call */ /* if not set in voice mode, */ /* ringing will be ignored. */ #define MSGWAIT 0x20 /* if set, detect message wait */ /* line 1 only. */ #define USEALEAD 0x40 /* if set, use A-lead relay */ /* c_waitdialtone, if dialtone is not detected within this time, */ /* dial function will return with an error. In unit of seconds. */ /* c_linestatus, this is read only and is ignored on PIOCSET. */ /* This provides status on call progress, message wait, line */ /* ringing. */ #define MESSAGE 0x0001 /* message waiting detected */ #define SETOFFHOOK 0x0002 /* handset in cradle or not */ #define INCOMERING 0x0004 /* incoming ringin detected */ #define CALLINCOME 0x0100 /* set until ioctl for inc call */ #define AUTOSELECT 0x8000 /* set if line is connected */ /* to set without offhook */ #define MODEMCONNECTED 0x4000 /* set when modem handshake */ /* completed */ #define NOTONE 0x0008 /* silence on the line */ #define DIALTONE 0x0010 /* dialtone detected */ #define BUSYTONE 0x0020 /* busytone detected */ #define CONGTONE 0x0040 /* congestion tone detected */ #define RGBKTONE 0x0080 /* ringback tone detected */ /* c_feedback, sets the options for monitoring call on the */ /* speaker. */ #define SPEAKERON 0x0001 /* use for outgoing calls, if */ /* speaker on is set, line is */ /* monitored on the speaker. */ #define SOFTSPK 0x0002 /* speaker volume control */ #define NORMSPK 0x0004 #define LOUDSPK 0x0006 #define RINGON 0x0010 /* use for incoming calls, if */ /* ringon is set, incoming call */ /* will generate ringing on the */ /* speaker; for voice only. */ #define SOFTRNG 0xf000 /* ring volume */ #define NORMRNG 0x7000 #define LOUDRNG 0xb000 #define LOWRNG 0x0000 /* different pitches for */ #define MEDRNG 0x0100 /* incoming rings */ #define HIMEDRNG 0x0200 #define HIRNG 0x0300 /* c_hookflash, specifies the down time of the hook switch */ /* during a hookflash operation. In units of milliseconds. */ struct uddata /* user dialling data */ { char dd_digit; /* digit to be dialed */ };