Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Compiling and installing applications

To create and compile a .c program file:

  1. Write a new file with .c extension, or copy and modify one of the sample programs provided in /vs/examples/IRAPI.
  2. Write a new make file with .mk extension, or copy and modify example.mk (provided in /vs/examples/IRAPI) to reference the names of your newly created .c files. For example, the chantest.c application stores all of its speech files in the /speech directory.
  3. Use the command gmake -f example.mk to compile the .c programs into executable files, where example.mk is name of your make file.
  4. Install the executable file anywhere desired. It does not have to be installed in any particular place on the system.
  5. Install the speech files in the location where they are referenced by the application. For example, the chantest.c application stores all its speech files in the /speech directory.
  6. Define the service for the IRAPI application using the defService(1IRAPI) command. The following example shows how this is done for the chantest application:

    defService -n -p chantest -t P chantest

    The -n option specifies that default values should be used for all options not specified on the command line. The -p option specifies the process name to which the service belongs. (In this case the service and process names are identical.) The process name string must be identical to the name used by the process as an argument to the irRegister(3IRAPI) function. The -t option specifies that chantest is a permanent process. This process should be running when the voice system is started and continue running until the voice system is stopped.

  7. Assign the service defined in Step 4 to a channel or dialed number in the same manner that TSM script services are assigned. The following example assigns the chantest service to channel 0:

    assign service chantest to chan 0

  8. Run a permanent IRAPI application when the voice system is started. The recommended way to accomplish this is to add a file to the /etc/conf/init.d directory containing an inittab(4) entry for the IRAPI process.

© 2006 Avaya Inc. All Rights Reserved.