
Description | Cautions | Example | Errors | See Also
Name: |
int fx_rtvContinue(dev, continue) | |
Inputs: |
int dev int continue |
fax channel device handle TRUE or FALSE |
Returns: |
0 if success -1 if failure | |
Includes: |
srllib.h dxxxlib.h faxlib.h | |
Category: |
miscellaneous | |
Mode: |
synchronous | |
The fx_rtvContinue( ) function is used for remote terminal verification. If you enable remote terminal verification (RTV), you must call this function after a PRE_PHASEB event is received by your application in order to proceed with the fax transfer. Otherwise, a firmware time-out occurs and the fax transfer is terminated.
To enable RTV, specify DF_ENABLE_RTV and DF_PHASEB in fx_sendfax( ). The RTV feature allows you to verify the recipient's identity and abort transmission if necessary before the firmware responds with a DCS message (digital command signal).
Parameter |
Description |
dev |
Specifies the channel device handle for the fax channel obtained when the channel was opened. |
continue |
Specifies whether the application wishes to proceed with the fax protocol or not. Values are TRUE or FALSE. |
None
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
DF_IOTT iott[10];
/* Handler for Phase B events. */
int phb_hdlr( );
main( )
{
int voxdev; /* Voice channel device handle. */
int dev; /* Fax channel device handle. */
/*
* Open the channel using dx_open( ) to obtain the Dialogic
* VOICE device handle in voxdev.
* Open the channel using fx_open( ) to obtain the FAX channel
* device handle in dev.
*/
.
.
/*
* Install handler using sr_enbhdlr( ) to service
* TFX_PHASEB events.
*/
if (sr_enbhdlr(dev, TFX_PHASEB, phb_hdlr) == -1) {
printf("Failed to install Phase B handler \n");
return;
}
/*
* Call fx_sendfax( ) in asynchronous mode after setting
* up the DF_IOTT array. Set DF_ENABLE_RTV and DF_PHASEB bits
* in mode field to enable generation of
* remote terminal verification and Phase B events.
*/
if (fx_sendfax(dev, iott, EV_ASYNC|DF_ENABLE_RTV|DF_PHASEB) == -1)
{
printf("Error: %s (error code %d)\n",
ATFX_ERRMSGP(dev), ATFX_LASTERR(dev));
}
.
.
.
/*
* Handler registered with SRL to handle TFX_PHASEB events.
*/
int phb_hdlr( )
{
int dev = sr_getevtdev( );
char szId[22], szValid[22];
strcpy(szValid, "OK TERMINAL");
if (sr_getevttype( ) == TFX_PHASEB)
{
if (fx_getparm(dev, FC_REMOTEID, szId) == -1)
{
printf("fx_getparm err: %s\n",
ATDX_ERRMSGP(dev));
// Getting remote ID failed. Abort.
fx_rtvContinue(dev, FALSE);
}
else
{
// Check the database here.
If (!strcmp(szId, szValid))
fx_rtvContinue(dev, TRUE);
else
fx_rtvContinue(dev, FALSE);
}
}
return 0;
}
None
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation