Table of Contents Index NMS Glossary Previous Page Next Page Version


Chapter 10

Demonstration Program


10.1 Introduction
10.2 Running the Program
10.2.1 Running Back-to-Back With isdndemo
10.3 Structure and Coding Features
10.3.1 Data Structures
10.3.2 Program Structure
10.3.3 Call Transfer

10.1 IntroductionTop of Page

The demonstration program, isdnxfer, illustrates the steps involved in performing a call transfer operation, under Q.SIG and ETS 300 (ETS 300). The program is a single-threaded layer 3 application. It automatically accepts inbound calls and then performs a transfer operation of the inbound call to another number. Because the transfer operation is protocol dependent, depending on the protocol being run, different application state tables are used to manage the application. For ETS 300, once the transfer is complete, both the inbound and outbound sides of the call are cleared by the network. For Q.SIG, the application continues to monitor both sides of the call for a disconnect. When a disconnect is detected, both the inbound and outbound sides are cleared.

10.2 Running the ProgramTop of Page

This program uses the following command-line arguments:
Option

Description

Default

-a nai

NAI to be used.

0

-b board_#

Board number.

0

-d dialstring

Dial string for outbound operation.

1234567

-p protocol

Protocol to use:

11 = ETS 300
16 = Q.SIG

16 (Q.SIG)

-v

Verbose (show ACU messages).

Non-verbose.

10.2.1 Running Back-to-Back With isdndemoTop of Page

For back-to-back running, the Q.SIG variation of this program can be run with isdndemo. For example, running isdndemo with the following options will work with the isdnxfer program.

isdndemo -n -p16 -o1
The ETS 300 version of isdnxfer can only be run when connected to a network.

10.3 Structure and Coding FeaturesTop of Page

The following sections describe the internal workings of isdnxfer.

10.3.1 Data StructuresTop of Page

Each B channel has a data structure associated with it. This data structure is called lineinfo and is defined in the header file isdnxfer.h. The purpose of this structure is to maintain state information about each B channel and to provide a mechanism to link the inbound and outbound B channels in a transfer operation. A global array of these structures is defined in isdnxfer.c. The NMS logical timeslot number of the B channel is used to specify the index into this array for a particular B channel.

10.3.2 Program StructureTop of Page

The main section of the program consists of an initialization section and an infinite event processing loop. In the initialization section, the lineinfo structures for all of the B channels are initialized, the command-line arguments are parsed, and the Natural Access services are started. The services started are the ADI service, the ISDN service, and the Switching service. (The switching service is only necessary for the Q.SIG transfer operation.) Once the services are started, the ISDN stack is started and the program enters an infinite event processing loop.

The processing loop waits for a Natural Access event. When it receives an event, it calls the ProcessEvent function For ISDN events, the DecodeISDNMessage function is called. Within this function, one of the following application processing routines is then called:

10.3.3 Call TransferTop of Page

The call transfer operation is protocol dependent: the call setup, transfer process, and call tear down process are controlled by different application routines depending upon whether the protocol is Q.SIG or ETS 300. The following sections describe the transfer process along with the event flow, for Q.SIG and for ETS 300.

Q.SIGTop of Page

The event processing is handled by the QSIGApplicationProcessing function.

  1. Inbound call arrives (ACU_CONN_IN).

    
    
  2. Answer call on B channel (ACU_CONN_RS).

    
    
  3. Inbound call is connected (ACU_CONN_CO).

    
    
  4. Find a free timeslot for an outbound call (use the linestate structure for this).

    
    
  5. Place an outbound call (ACU_CONN_RQ).

    
    
  6. Connect inbound and outbound B channels.

    
    
  7. Outbound call is connected (ACU_CONN_CO).

    
    
  8. Send facility message to the inbound side specifying a transfer-by-join operation.

    
    
  9. If message is wrong - ACU_FACILITY_IN.

    
    
  10. Send facility message to the outbound side specifying a transfer-by-join operation.

    
    
  11. If message is wrong - ACU_FACILITY_IN.

    
    
  12. Detect disconnect on either the inbound or outbound side.

    
    
  13. When a disconnect is detected (ACU_CLEAR_IN), respond to the disconnect (ACU_CLEAR_RS).

    
    
  14. Send a disconnect to the other end (ACU_CLEAR_RQ).

    
    
  15. Receive a confirmation of disconnect from both the inbound and the outbound sides (ACU_CLEAR_CO).

    
    
  16. Disconnect the B channels.

ETS 300Top of Page

The event processing is handled by the ETS300ApplicationProcessing function.

  1. Inbound call arrives (ACU_CONN_IN).

    
    
  2. Answer call on B channel (ACU_CONN_RS).

    
    
  3. Inbound call is connected (ACU_CONN_CO).

    
    
  4. Issue a facility message to place the call on hold.

    
    
  5. Receive a confirmation (probably with an ACU_FACILITY_IN).

    
    
  6. Place an outbound call on the same B channel (ACU_CONN_RQ).

    
    
  7. Outbound call is connected (ACU_CONN_CO).

    
    
  8. Send facility message to the inbound side specifying a transfer operation.

    
    
  9. Send transfer request on outbound call. Choose outbound since this is the active call.

    
    
  10. Receive a confirmation (ACU_FACILITY_IN).

    
    
  11. Wait for disconnect on the inbound and outbound sides.

    
    
  12. When a disconnect is detected (ACU_CLEAR_IN), respond to the disconnect (ACU_CLEAR_RS).

    
    
  13. Receive a confirmation of disconnect (ACU_CLEAR_CO).



Table of Contents Index NMS Glossary Previous Page Next Page Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.