@ECHO OFF

REM
REM Configure CPLD to generate alternate fax frame signal
REM
CD %VBOARD%
ECHO -- ---------------------- --
ECHO -- -- Alternate FAX FS -- --
%VBOARD%\fax_fs

REM
REM Delete Fax.def
REM
CD %VBOARD%
ECHO -- -------------------------- --
ECHO -- -- Board Identification -- --
if exist fax.def goto defyes
if not exist fax.def goto defno
:defyes
del fax.def
goto cont
:defno
:cont
%VBOARD%\faxdef

REM
REM Launch the voice driver
REM
CD %VBOARD%
ECHO -- -------------------------- --
ECHO -- -- Voice Channel Driver -- --
REM %VBOARD%\medfed
%VBOARD%\medhpi -e1024 -p100

REM
REM Launch the Fax driver
REM
ECHO -- -------------------------- --
ECHO -- --  Fax Channel Driver  -- --

if not exist fax.def goto nofile
if exist fax.def goto file
:file
ECHO -- -------------------------- --
ECHO -- --  bcmfxdrv -h9 -b320  -- --
%VBOARD%\bcmfxdrv -h9 -b320 
goto end
:nofile
ECHO -- -------------------------- --
ECHO -- --  bcmfxdrv -h9 -b330  -- --
%VBOARD%\bcmfxdrv -h9 -b330
:end 
CD \