After you initialize NaturalAccess and create event queues and contexts, the line represented by each context is in an uninitialized line state. The application now starts a protocol (TCP) instance on each context. This changes the line state to idle, preparing it to accept an incoming call or place an outbound call.
Complete the following steps to start a TCP instance:
|
Step |
Action |
|
1 |
The NaturalAccess Parameter Management Service loads protocol parameters and default values. For more information, see Overview of the NCC API parameters. |
|
2 |
The application modifies the values, if necessary. |
|
3 |
The application calls nccStartProtocol to start the protocol instance. The instance is parameterized according to the loaded parameters. |
The following sections provide general information about loading and starting protocols. For specific information about a protocol, refer to the protocol-specific documentation.
After a context is open and the protocol parameters are loaded, the application starts a protocol on that context using the loaded parameters. nccStartProtocol starts a protocol on a context. If the protocol starts successfully, the application can then use call control functions to place and answer calls on that line.
Note: To start a protocol from within an application, the protocol must have been downloaded to the board at system initialization time. The configuration utility downloads all protocols specified in the configuration file. For more information about the configuration file, see your board-specific installation and developer's manual.
protname passed to nccStartProtocol should be the name of the protocol, as specified in the configuration file. For example, for ISDN Software, you would specify isd0. Unless you want to load custom parameters, set startparms, mgrstartparms, and protostartparms to NULL so the default protocol parameters are used. For more information, refer to NCC API global parameters.
When nccStartProtocol is called, NCCEVN_START_PROTOCOL_DONE is returned. If the protocol is started successfully, the event value field contains CTA_REASON_FINISHED. The line state changes from uninitialized to idle. The application can now use other NCC call control functions to perform call control on the line.