# Overlapped sending and receiving

Some variants of the ISDN Software protocol support overlapped sending and overlapped receiving: the ability to send or receive address digits one at a time.

Capability mask lists the capabilities for each variant. If OVERLAPPED_SENDING is set, the variant supports overlapped sending. The application determines whether a variant supports this capability by invoking nccQueryCapability. The NCC_CAP_OVERLAPPED_SENDING bit in the capability mask returned by this function indicates if the variant supports this capability.

Note: DPNSS supports overlapped sending and overlapped receiving.

## Setting up overlapped sending and receiving

If the ISDN variant supports overlapped sending and receiving, to use the features the application must change bits in the behavior parameter structures when starting the ISDN Software protocol stack.

Feature | Description
Performing overlapped sending | The application much change a bit in the out_calls_behaviour parameter in the ISDN_PROTOCOL_PARMS_ CHANNELIZED structure when starting the ISDN Software protocol stack. The application must enable the CC_USER_SENDING_COMPLETE (0x0002) bit to prevent the stack from automatically setting it in the SETUP message. Command line switch -O (capital O) in the ISDN daemon isdncta sets this bit.
Performing overlapped receiving | The application much change a bit in the in_calls_behaviour parameter in the ISDN_PROTOCOL_PARMS_CHANNELIZED structure when starting the ISDN Software protocol stack. The bit CC_TRANSPARENT_OVERLAP_RCV (0x0080) should be enabled. Command line switch (-I) in the ISDN daemon isdncta sets this bit. In addition, the overlappedreceiving parameter must be set in the NCC_START_PARMS structure (invoked when nccStartProtocol is called) to inform the TCP that overlapped receiving mode is requested by the application. By default, this parameter is set. The NCCEVN_RECEIVED_DIGIT event (indicating that a digit has arrived) is generated only if the NCC.START.overlappedreceiving parameter is set. See the Natural Call Control Service Developer's Reference Manual.

For more information about these parameter structures, see the Dialogic® NaturalAccess™ ISDN Messaging API Developer's Manual.

## Performing overlapped sending and receiving

Once overlapped sending and receiving are set up, you can perform overlapped transfers.

Feature | Description
Performing overlapped sending | To perform overlapped sending, the application invokes nccPlaceCall, passing the first sequence of digits in the calledaddr argument. If more digits will follow, the digit string must end with a ~ character. After the application receives NCCEVN_PLACING_CALL, indicating that it has reached the placing call state, it invokes nccSendDigits to send additional segments of the digit string. If a digit string sent by an invocation of nccPlaceCall or nccSendDigits is not the final one, the final character in the string must be a ~. The final digit string must not include the final ~ character. For example: nccPlaceCall 72~ ccSendDigits 57924~ ccSendDigits 5~ ccSendDigits 28 Final digit string: 7257924528 nccSendDigits can be called several times until all digits are sent, or the switch sends NCCEVN_CALL_PROCEEDING indicating that it has accepted the call setup. No digits can be sent after this point.
Performing overlapped receiving | An incoming call begins in the seizure call state. When the first digit arrives, the application receives an NCCEVN_RECEIVED_DIGIT event. This places the call in receiving digits call state. Each subsequent NCCEVN_RECEIVED_DIGIT event indicates that another digit has been received. The call remains in the receiving digits call state until all digits are received, or the application calls an appropriate call control function (for example, nccAcceptCall or nccAnswerCall). As each digit is received, it is added to the calledaddr field in the NCC_CALL_STATUS structure. NCCEVN_INCOMING_CALL indicates that all digits have arrived. If call collision (glare) occurs directly after the application has issued a command, NCCEVN_RECEIVED_DIGIT or NCCEVN_INCOMING_CALL can be returned before the confirmation event for the command (for example between nccAcceptCall and NCCEVN_ACCEPTING_CALL). The event changes the call state from receiving digits to a new state.