(Page 3 of 10 in this chapter) Version


Using Voice and Fax: faxback

Name

faxback

Purpose

Uses voice and fax functions to receive a call, play a prompt menu and respond to input by sending a fax to the caller. It can receive input from a "live" caller, or from the simulated caller provided by the caller demonstration program.

Usage

faxback [options]

options are:
Option

Description

Default

-b n

Specifies the AG board number n.

0

-q

Specifies that the board is a QX 2000 board.

AG board

-s n:m

Specifies the stream and timeslot.

0:0

-r resolution

Specifies the resolution (low, high, or superhigh).

low

-e encoding

Specifies the encoding (1D, 2D, or MMR).

1D

-c mode

Specifies conversion mode:

y = yes (NFX_OTF_ALWAYS)
m = maybe (NFX_OTF_ONLY_IF_FAIL)
n = no (NFX_OTF_NEVER)

m

-p protocol

Specifies the protocol (TCP name).

nocc

-E

Toggles using ECM mode when encoding is 1D or 2D.

Do not use ECM.

-v

Toggles verbose reporting of event information.

Non-verbose mode.

Description

faxback demonstrates using voice, DTMF detection, and fax functions during a single telephone call. It uses API functions from NaturalFax, CT Access, and the ADI service. This demonstration application plays a fixed prompt menu to the caller, allows the caller to select a document, and faxes the document back to the caller.

The demonstration begins by initializing the CT Access environment, and then opens the ADI service on a CTA context associated with the specified board, stream, and timeslot.

When faxback receives a call, it plays a voice menu prompt that requests that the caller enter DTMF tones to select a document. faxback initializes a document queue, then uses DTMF detection to determine which document(s) the caller has selected. Then faxback enqueues the document(s), sets transmit parameters, and transmits the requested document(s).

faxback monitors all events until it receives the NFXEVN_SESSION_DONE event, and takes appropriate actions if the call is disconnected or if a board error occurs. After the fax is transmitted, the document queue is destroyed, and faxback returns to waiting for the next incoming call. faxback runs in an infinite loop. Enter Ctrl+C to terminate the demonstration program.

This program may be used interactively by calling it from a fax machine, or in conjunction with another NaturalFax demonstration program, caller, for automated testing. DTMF tones are used to synchronize faxback and caller.

faxback begins by initializing the CT Access environment, and then opens the ADI service on a CTA context associated with the specified board, stream, and timeslot. It places the call, and after detecting the DTMF tone that signals the end of the prompt menu, it generates the DTMF tone that corresponds to a request for a document catalog.

caller then creates a document queue, enqueues temporary files, sets receive parameters, and receives the document when faxback transmits it.

caller monitors all events until it receives the NFXEVN_SESSION_DONE event, and takes appropriate actions if the call is disconnected or if a board error occurs. After the fax has been received, the document queue is destroyed, and caller places another call. caller runs in an infinite loop. Enter Ctrl+C to terminate the demonstration program.



(Page 3 of 10 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.