# Inbound call control: incta

Demonstrates:

- Call control answer and release. Refer to the Natural Call Control Service Developer's Reference Manual for more information about call control.

- Synchronous programming model for one port in one process.

- Play and record using the Voice Message service. Refer to the Voice Message Service Developer's Reference Manual for more information.

- Context sharing and object descriptor hand off (when used with csplayrc). For more information, refer to Service sharing on a local server: csplayrc.

#### Usage

incta [options]

where options include:

Option | Use this option to...
--- | ---
-A xxxmgr | Specify the Natural Access service manager. Default: ADIMGR
-b n | Specify the board number n. Default: 0
-F filename | Specify the name of the Natural Access configuration file. Default: cta.cfg
-i i | Specify the number of iterations (i) before exit. Note: You can also stop the program by entering Ctrl+C under Windows and Solaris.
-l | Show low-level events.
-p protocol | Specify the protocol to run. Default: lps0
-s [stream:]slot | Specify the port (DSP) address. Default: 0:0

When running csplayrc, options include:

Option | Use this option to...
--- | ---
-C | Run incta in server mode. Specify this option only if you are using incta with csplayrc.
-m contextname | Specify the context name for the communication context. Default: commn-cxt
-x contextname | Specify the context name for call control/voice play and record processing. Default: incta-demo

For more information about using these options, refer to Service sharing on a local server: csplayrc.

#### Featured functions

adiCollectDigits, nccAnswerCall, nccGetCallStatus, nccQueryCapability, nccRejectCall, nccReleaseCall, nccDisconnectCall, vceCreateFile, vceOpenFile, vcePlayList, vceRecordMessage

Also, (when used with csplayrc):

ctaAttachContext, ctaCreateContextEx, ctaCreateQueue

#### Description

This description applies to the wink-start protocol wnk0.

When you take the handset off-hook, the TCP acknowledges the line seizure by generating a wink.

After the wink, enter three DTMF digits as the address. If the call connects, the demonstration proceeds into the conversation state and you are prompted to record voice, play back your recorded sample, or hang up.

#### Procedure

The following procedure assumes you are testing on an AG 2000 board that has a 2500-type telephone connected to one of the lines.

Complete the following steps to run incta:

Step | Action
1 | Start incta by entering the following command at the prompt: incta -b n -s [stream:]slot -p wnk0 -i i
2 | Specify the board and timeslot for the handset you are using.
3 | Take the handset off-hook. The wink-start is acknowledged.
4 | Enter three DTMF digits as the address.
If the first digit is... | Then the demonstration releases the call...
--- | ---
8 | By playing a reorder tone.
9 | With a busy tone.
0 | By playing a special information tone.
If the first digit is not 8, 9, or 0, the call connects and the demonstration proceeds into the conversation state. You are prompted to record voice, play back your recorded sample, or hang up.
5 | Select the record voice option. You hear the record beep prompt.
6 | Begin speaking after the prompt. After you stop speaking, the record operation terminates and you return to the options menu.
7 | Select the playback option. The sample you just recorded plays back. You return to the options menu.
8 | Select the hang-up option.

To stop the program, enter Ctrl+C for Windows and UNIX.

incta demonstrates synchronous programming on a single port. A start command is initiated and the demonstration continuously retrieves events from the board until the expected event returns, simplifying the overall program flow.

This demonstration can be used with various protocols or configurations. If the address is not available to it, skip the first two parts (selective rejection of calls and recitation of the called number), and go to the play/record loop.