# nccStartProtocol

Prepares an uninitialized line to be used by a protocol to accept and/or place calls.

#### Prototype

DWORD nccStartProtocol ( CTAHD linehd, char *protname, NCC_START_PARMS *startparms, void *mgrstartparms, void *protstartparms )

Argument | Description
linehd | Line handle to initialize.
protname | Name of protocol to start on the line.
startparms | Pointer to a NCC_START_PARMS structure containing generic NCC protocol-starting parameters. To use the default parameters, set this argument to NULL. typedef struct { DWORD size; DWORD eventmask; WORD debugflag; WORD waitforPCtime; WORD overlappedreceiving; struct { DWORD size; WORD dialtonefreq1; WORD dialtonefreq2; WORD dialtoneontime1; WORD dialtoneontime2; WORD dialtoneofftime1; WORD dialtoneofftime2; WORD dialtonelevel; WORD ringfreq1; WORD ringfreq2; WORD ringontime; WORD ringofftime1; WORD ringofftime2; WORD ringtonelevel; WORD busyfreq1; WORD busyfreq2; WORD busyontime; WORD busyofftime; WORD busytonelevel; WORD fastbusyfreq1; WORD fastbusyfreq2; WORD fastbusyontime; WORD fastbusyofftime; WORD fastbusytonelevel; } callproggenerate; } NCC_START_PARMS; See NCC.START structure and NCC.START.callproggenerate parameters for complete field descriptions.
mgrstartparms | Pointer to a manager-specific NaturalAccess protocol-starting parameter structure. Protocol-independent applications can use the default parameters by setting this argument to NULL. For parameter descriptions for the ADI implementation of the NCC API, see NCC.X.ADI_START.
protostartparms | Pointer to a protocol-specific NaturalAccess protocol-starting parameter structure. Protocol-independent applications can use the default parameters by setting this argument to NULL.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | protname is NULL.
CTAERR_INVALID_HANDLE | The NCC API is not open on the specified line.
CTAERR_INVALID_STATE | A protocol is already started on this line.
CTAERR_SVR_COMM | A server communication error occurred.

#### Events

Event | Description
--- | ---
NCCEVN_START_PROTOCOL_DONE | Acknowledges the application's attempt to start a protocol on a context (line handle). The event value field indicates if the protocol was started or not. For a list of reason codes, see NCCEVN_START_PROTOCOL_DONE.

#### Details

The event value field can also contain CTAERR_BOARD_ERROR, indicating that an error occurred on the board when the application attempted to start a protocol. If you configured the echo canceller, verify that the DSP file was downloaded to the board.

Refer to NCC API global parameters for default NCC_START_PARMS parameter settings.

#### See also

ctaOpenServices, nccStopProtocol