BFAX_CALL_BACK

Purpose

When invoking the BFAX_SEND_FAX state table to send a two-call fax, you must specify the name of a state table in the callback_st parameter. This state table will be invoked after the fax has been taken from the queue and an attempt has been made to send it. The state table is invoked whether or not the fax was sent successfully. A state table called BFAX_CALL_BACK is provided as an example of a state table which conforms to the interface specification which follows. It makes an entry in the log file called BFAX_CALL_BACK.log in the directory specified by the environment variable OAM_LOG_PATH. The fax application developer is free to replace the BFAX_CALL_BACK state table with one of his own design to perform any actions which may be required at this stage of processing a two-call fax. The only constraint is that the number and type of its parameters must exactly match those described in this section.

ASCII syntax

This BFAX_CALL_BACK is not called by a user's state table as the invocation of this state table is from inside the BrooktroutFax custom server. However, for completeness the syntax of a typical invocation of this state table is included here:

InvokeStateTable ("DIRECT", BFAX_CALL_BACK, start, filename, profile_id, start_date, start_time, duration, retry_count, called_number, device_state, device_rc);

Entry Point

The entry point for this state table is start

Parameters

filename (STRING)
The file name of the fax. This was provided by the call to BFAX_SEND_FAX when the fax was queued.
profile_id (STRING)
The Blueworx Voice Response profile ID. This was provided by the call to BFAX_SEND_FAX when the fax was queued.
start_date (STRING)
The date the fax was sent (yyyy/mm/dd)
start_time (STRING)
The (local) time the fax was sent (hh:mm:ss)
duration (NUMBER)
The duration of the fax operation in seconds
retry_count (STRING)
Number of retries required to send the fax
called_number (STRING)
The telephone number to which the fax was sent. This was provided by the invocation to BFAX_SEND_FAX when the fax was queued.
device_state (NUMBER)
This is the state of the fax handler. If the fax was sent successfully, this will be 8. If it is -1, it means that the transmission has failed.

8 Sent
-1 Failure

device_rc (NUMBER)
Code which reflects the outcome of sending or attempting to send the fax.

-1 Failed to invoke the BFAX_SEND_FAX state table
0 Fax sent successfully
1 Fax send operation failed

Note: Unlike the parameters in the BFAX_SEND_FAX and BFAX_RECV_FAX state tables, the parameters device_state and device_rc are input parameters.

Return codes

None of the state table parameters are used to return values to the invoker, and any edges returned are ignored. The state table is invoked by the BrooktroutFax custom server which cannot be accessed internally or modified by the fax application developer

Description

This state table, as specified in the callback_st parameter is invoked once a fax has been sent from the queue (that is, in a two-call fax).