ioctl(ixj, PHONE_RING)
Return Value
PHONE_RING returns TRUE if the telephone is answered. It returns FALSE if maxrings is reached.
Parameters
None
Remarks
Used ring the phone and to determine if the telephone has been answered. Starts the POTS port ringing. This is a blocking call and will not return until the phone is taken off hook, or maxrings (as set by PHONE_MAXRINGS) is reached.
See Also:
PHONE_MAXRINGS, PHONE_RING_START, PHONE_RING_CADENCE, PHONE_RING_STOP
Example:
if(argc >= 3) maxrings = atoi(argv[2]); else maxrings = 2; ioctl(ixj, PHONE_MAXRINGS, maxrings); if(!ioctl(ixj, PHONE_RING)) { printf("No Answer\n"); } else { printf("Phone answered\n"); }
©1996-2001 Quicknet Technologies, Inc.