IBMTromboneRdy

This state table encapsulates some of the code needed to continue a trombone operation that is performed in several parts. It checks to see if an outbound call, previously requested by the IBMTromboneMake state table, has completed successfully or with an error.

IBMTromboneRdy uses a ReceiveData action to wait for the amount of time specified in wait_time for a response to the make call request. On successful completion, a third party has been called and connected to Blueworx Voice Response. The caller and third party are connected on the TDM bus at this time. The IBMTromboneConn state table should be used to complete the connection. If the ReceiveData action times out, a return code of 229 is generated.

This state table is called by the user’s application, along with a number of parameters using the InvokeStateTable action. See IBMTromboneXmpB for an examples of how to use this state table.

This state table may also be called by the IBMTromboneMake state table.

The source code is well commented and customization should be easy. The function to log data has been provided in a separate state table that may be invoked (IBMTromboneLog) to prevent this state table becoming too complex and cluttered.

Parameters

String log_filename (64 characters max):

If this is blank, no event logging is performed. If a filename is supplied, event logging of the trombone calls and the results are logged to an event log with the given filename. The logging is performed by the IBMTromboneLog state table.

Number wait_time (value is in seconds):

The amount of time to wait for a response to the MakeCall request that is sent to the IBM_Trombone_Custom_Server.

If this is set to zero, the state table returns as soon as the MakeCall request has been sent, without checking to see if the MakeCall has failed or succeeded.

If this is set to a non-zero value, the state table waits for up to this amount of time to see if the MakeCall has failed or succeeded. The IBMTromboneRdy state table is used to perform this test.

Number call_status (this value is returned):

The returned status of the trombone operation.

If the value is zero, the trombone operation was successful and was terminated either by the third party hanging up, or by the caller requesting a disconnection by dialling the correct DTMF sequence.

If this value is non-zero, the trombone operation did not complete successfully. Table 1 shows the meanings of the possible call_status values.

This state table will return different edges depending on which range of possible values the call_status lies in (also defined in Table 1). This allows the general area of the problem to be determined immediately by the return edge of the InvokeStateTable action that called IBMTromboneRdy.

The IBMTromboneRdy state table can return any of the following values: 0 to 200, 203 to 207, and 229.

Number partner_call_id (this value is returned).:

The Call Reference (SV237) of the outbound part of the trombone operation. It is supplied to provide a unique link between the two halves of the trombone operation for debug purposes. This value is set only if the outbound call is successful within the wait_time specified.

String user_status (this value is returned, up to 64 characters).:

Some user-defined data for simple communications from the outbound state table to the inbound state table. This may be used, for example, to indicate the response of the third party to the trombone request (such as a reason code for connection refused). The inbound state table can then play a prompt to the caller appropriate to the third party response. This value is set only if the outbound call is successful within the wait_time specified.