adiAssertSignal

Asserts an out-of-band signaling pattern to the line.

Supported board types

Prototype

DWORD adiAssertSignal ( CTAHD ctahd, unsigned pattern)

Argument

Description

ctahd

Context handle returned by ctaCreateContext or ctaAttachContext.

pattern

Bit mask to assert.

Return values

Return value

Description

SUCCESS

 

CTAERR_FUNCTION_NOT_AVAIL

Specified context's protocol does not allow an out-of-band signaling pattern.

CTAERR_INVALID_CTAHD

Context handle is invalid.

CTAERR_INVALID_STATE

Function is not valid in the current port state.

CTAERR_OUTPUT_ACTIVE

Specified port is actively dialing.

CTAERR_SVR_COMM

Server communication error.

Details

adiAssertSignal asserts the specified out-of-band signaling pattern, which is either the physical out-of-band signal bits of digital lines or relates to the control of analog interface boards. In both cases, four signaling bits are addressed: A, B, C, and D, often written as ABCD, and defined by a bit mask (0x8, 0x4, 0x2, and 0x1, respectively). The following constants are in adidef.h and can be combined with the OR operator to assert any group of bits: ADI_A_BIT, ADI_B_BIT, ADI_C_BIT, and ADI_D_BIT.

This function cannot be used unless the current protocol specifically allows it. CTAERR_FUNCTION_NOT_AVAIL is returned if the application invokes adiAssertSignal when disallowed by the protocol.

When using adiAssertSignal and adiStartPulse on CG boards configured for D4 framing, ensure that the C bit and the D bit are set the same as the A bit and the B bit. Otherwise, the received A bit and B bit at the remote end remains in an indeterminate state.

For example, to set the A bit high and the B bit low, call adiAssertSignal as follows:

adiAssertSignal (ctahd, ADI_A_BIT | ADI_C_BIT);

When using this function with a system that includes an analog interface board, refer to the hardware installation manual for the analog interface board for specific information on how the A and B bits affect the telephone line.

For more information, refer to Performing low-level call control.

See also

adiQuerySignalState, adiStartDial

Example

/*
* Not using standard call control; managing actual line interface directly.
*/

#define MY_ONHOOK  0x00
#define MY_OFFHOOK ( ADI_A_BIT | ADI_B_BIT )

void myPickUp( CTAHD ctahd )
{
   adiAssertSignal
( ctahd, MY_OFFHOOK );
}

void myHangUp( CTAHD ctahd )
{
   adiAssertSignal
( ctahd, MY_ONHOOK );
}