⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pstnfp.h

📁 ipt网关源码
💻 H
字号:
/**********************************************************************************************
* 
* $ProjectName: X:\SIPROJ\VOIP\HOST\WIN_NT\DEMOS\VOIPGATE\PROJECT.PJ $
* $ProjectRevision: 1.5 $
* $Label$
* $Revision: 1.7 $ - $Date: 1997/08/17 10:58:08 $
* 
**********************************************************************************************/

#ifndef _PSTNFP_H
#define  _PSTNFP_H                

#ifdef __cplusplus
extern "C" {
#endif /* def __cplusplus */


      ///////////////////////////////////////////////////////
      ///                                                 ///
      ///      DEFINITION OF GLOBAL FUNCTIONS             ///
      ///                                                 ///
      ///////////////////////////////////////////////////////


/*****FUNCTION***************************************************
*        NAME : pstnGetVOXChannels
* DESCRIPTION : Gets the number of VOX channels available
*               in the system
*       INPUT : None
*      OUTPUT : None
*     RETURNS : Number of Voice channels
*    CAUTIONS : None
****************************************************************/
USHORT pstnGetVOXChannels();


/*****FUNCTION***************************************************
*        NAME : pstnOpenFrontEnd
* DESCRIPTION : Initialize front end
*       INPUT : USHORT numTSC -  Number of channels
*      OUTPUT : None
*     RETURNS : success or fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnOpenFrontEnd(USHORT numTSC);


/*****FUNCTION***************************************************
*        NAME : pstnState
* DESCRIPTION : Checks pstn state
*       INPUT : USHORT channel   -  Channel to set hook 
*      OUTPUT : None
*     RETURNS : TRUE - channel is off hook
*               FALSE - channel is on hook
*    CAUTIONS : None
****************************************************************/
BOOL pstnState(USHORT channel);


/*****FUNCTION***************************************************
*        NAME : pstnSetLine
* DESCRIPTION : Sets phone line on hook or off hook
*       INPUT : USHORT channel   -  Channel to set hook 
*               USHORT on        -  On hook or off hook
*      OUTPUT : None
*     RETURNS : Success or fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnSetLine(USHORT channel, USHORT on);


/*****FUNCTION***************************************************
*        NAME : pstnGetDigits
* DESCRIPTION : Gets phone number to dial, 
*               in case of Analog front-end
*       INPUT : channel, the event device
*      OUTPUT : none
*     RETURNS : none
*    CAUTIONS : none
****************************************************************/
BOOL pstnGetDigits(USHORT channel);


/*****FUNCTION***************************************************
*        NAME : pstnDial
* DESCRIPTION : Dials using the D/xxx card
*       INPUT : USHORT channel   -  Channel to make the dialing on 
*               PCHAR dialString -  Extention to dial to
*      OUTPUT : 
*     RETURNS : TRUE - success, FALSE - fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnDial(USHORT channel, PCHAR dialString);


/*****FUNCTION***************************************************
*        NAME : pstnCloseFrontEnd
* DESCRIPTION : Closes front end hardware
*       INPUT : USHORT channel   -  Channel to close
*      OUTPUT : None
*     RETURNS : TRUE - success, FALSE - fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnCloseFrontEnd(USHORT channel);


/*****FUNCTION***************************************************
*        NAME : pstnGetXMitSlot
* DESCRIPTION : Get transmit timeslot for given channel
*       INPUT : USHORT channel   -  Channel to get its transmit TS 
*               UINT *timeslot   -  Time slot
*      OUTPUT : UINT *timeslot   -  Time slot the channel transmit on
*     RETURNS : TRUE - success
*    CAUTIONS : None
****************************************************************/
BOOL pstnGetXMitSlot(USHORT channel, UINT *pTimeslot);


/*****FUNCTION***************************************************
*        NAME : pstnListen
* DESCRIPTION : Listen to a given timeslot
*       INPUT : USHORT channel  
*               UINT timeslot    -  Time slot to listen to
*      OUTPUT : None
*     RETURNS : TRUE - success, FALSE - fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnListen(USHORT channel, UINT timeslot);


/*****FUNCTION***************************************************
*        NAME : pstnUnListen
* DESCRIPTION : UnListen on a given channel, and relisten to default
*       INPUT : USHORT channel
*      OUTPUT : None
*     RETURNS : TRUE - success, FALSE -fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnUnListen(USHORT channel);


/*****FUNCTION***************************************************
*        NAME : pstnOffHook
* DESCRIPTION : Sets the channel off hook
*
*       INPUT : channel, the event device
*      OUTPUT : none
*     RETURNS : none
*    CAUTIONS : none
****************************************************************/
BOOL pstnOffHook(USHORT channel);


/*****FUNCTION***************************************************
*        NAME : pstnOnHook
* DESCRIPTION : Sets the channel on hook
*       INPUT : channel, the event device
*      OUTPUT : none
*     RETURNS : none
*    CAUTIONS : none
****************************************************************/
BOOL pstnOnHook(USHORT channel);


/*****FUNCTION***************************************************
*        NAME : pstnGetEvent
* DESCRIPTION : Gets SRL event and channel
*       INPUT : None
*      OUTPUT : None
*     RETURNS : TRUE - success, FALSE - fail
*    CAUTIONS : None
****************************************************************/
BOOL pstnGetEvent();



      ///////////////////////////////////////////////////////
      ///                                                 ///
      ///      DECLARATION OF LOCAL FUNCTIONS             ///
      ///                                                 ///
      ///////////////////////////////////////////////////////



/*****FUNCTION***************************************************
*        NAME : closePstnChannel
* DESCRIPTION : Closes one pstn channel
*       INPUT : USHORT channel   -  Channel to close
*      OUTPUT : 
*     RETURNS : TRUE - success, FALSE - fail
*    CAUTIONS : None
****************************************************************/
BOOL closePstnChannel(USHORT channel);


#ifdef __cplusplus                /* close C++ brackets */
}   
#endif /* def __cplusplus */

#endif /* ndef _GATEPSTN_H */

/*** End of File ***/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -