• PHONE_EXCEPTION

    ioctl(ixj, PHONE_EXCEPTION)

    Return Value

    Returns an integer with the low 14 bits holding the exception type.

    Parameters

    None.

    Remarks

    When an exception occurs this routine will return a bitflag encoded value carrying the exception that occurred.

    Bit 0DTMF is available
    Bit 1Hook State Change.
    Bit 2Flash hook detected on the POTS port.
    Bit 3PSTN line is ringing.
    Bit 4Caller ID data is available.
    Bit 5PSTN Wink detected (other end hung up).
    Bit 6Filter 0 has changed state.
    Bit 7Filter 1 has changed state.
    Bit 8Filter 2 has changed state.
    Bit 9Filter 3 has changed state.
    Bit 10Filter Cadence 0 was detected.
    Bit 11Filter Cadence 1 was detected.
    Bit 12Filter Cadence 2 was detected.
    Bit 13Filter Cadence 3 was detected.

    The value for Bit 1 represents a hook state change. It is set both at the time the phone goes off hook, and when it goes back on hook. It is an indication that the application should call IXJCTL_HOOKSTATE because the hook state has changed. Calling IXJCTL_HOOKSTATE clears this exception. IXJCTL_EXCEPTION should be called when select() has set the exception set on the file descriptor.

    See Also:

    PHONE_HOOKSTATE

    Example:

    #include telephony.h
    
    union telephony_exception ixje;
    
    ixje.bytes = ioctl(ixj, PHONE_EXCEPTION);
    if(ixje.bits.dtmf_ready)
    {
    // Deal with DTMF
      printf("DTMF from card 0 = %c\n",ioctl(ixj, PHONE_GET_DTMF_ASCII));
    }
    if(ixje.bits.hookstate)
    {
      if(ioctl(ixj, PHONE_HOOKSTATE))
        printf("Off Hook\n");
      else
        printf("On Hook\n");
    }
    fflush(stdout);
    


    ©1996-2001 Quicknet Technologies, Inc.