Defining FDM main overlays

A main definition contains an initial overlay (or setup) for the telephone softkeys and screen and several on statements that cause alternative overlay definitions to be used when specific events occur.

The syntax of a main definition is:

main parm 1 ... parm n
{
      statement 1;
      ...
      statement n;
}

where:

parm 1 ... parm n
Optional parameters that can be substituted in some of the statements 1 ... n or their substatements.
statement 1 ... statement n
A list of FDM function statements that define the data stream to be sent to the ADSI telephone.

You must send the parameters parm 1 ... parm n to an ADSI state table (you can use any of the ADSI_FDM state tables or the ADSI_CPEID state table). You must prefix the parameter names with the dollar ($) character when you use them in the FDM statements.

Note:
  1. You can also use the following special substitution parameters with FDM functions. They should not be defined or included in the main statement parameter list, because they are dynamically substituted when the overlay is used.
    $CALL1P
    Primary column of Call Reference Buffer 1
    $CALL1S
    Secondary column of Call Reference Buffer 1
    $CALL1B
    Primary and secondary columns of Call Reference Buffer 1
    $CALL2P
    Primary column of Call Reference Buffer 2
    $CALL2S
    Secondary column of Call Reference Buffer 2
    $CALL2B
    Primary and secondary columns of Call Reference Buffer 2

    See Call-related information for more information on the Call Reference Buffer.

  2. Not all FDM statements allow parameters to be substituted. See the statement descriptions in ADSI script statements to find out which statements have this capability.
  3. The substitution parameters that are used in the overlay definitions are included in the main definition of an FDM script source file. This procedure is different from the procedure for SDC script source files, where the substitution parameters are included in the single function definitions.

For more information, see main.

The following is an example of an FDM main definition:

main test1
{
      load_overlay clear;
      display 1 "$test1";
      display 2 "Press DIAL to connect";
      install_softkey dial;
}

In this example, the optional parameter test1 must be sent to the state table (you can use any of the ADSI_FDM state tables or the ADSI_CPEID state table). The softkeys and screen setup that are in an overlay called clear are used, and the value of test1 is displayed on the first line of the ADSI telephone display. This is followed by the Press DIAL to connect message. The softkey definition named dial is used to set up another softkey for the user.