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

📄 main.h

📁 dialogic voip 测试代码
💻 H
字号:
/**********************************************************************************************
* 
* $ProjectName: X:/SIPROJ/VOIP/HOST/WIN_NT/DEMOS/Samples.rel5/Dm3/Iplink/project.pj $
* $ProjectRevision: 1.5 $
* $Label$
* $Revision: 1.3 $ - $Date: 2001/10/07 16:02:30 $
* 
**********************************************************************************************/

#ifndef _MAIN_H
#define  _MAIN_H              

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

#ifdef EXTERN
#undef EXTERN
#endif


#include "incfile.h"
#include "gatestrc.h"



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







/*****FUNCTION***************************************************

*        NAME : getChannel

* DESCRIPTION : Gets the active channel to send message to

*       INPUT : None  

*      OUTPUT : None

*     RETURNS : int - Channel number

*    CAUTIONS : None

****************************************************************/

int getChannel();



/*****FUNCTION***************************************************

*        NAME : SendUIIMsg

* DESCRIPTION : A convenient function to send UII Message (H.245).

*       INPUT : channel 

*      OUTPUT : None

*     RETURNS : 1 - success, 0 - fail

*    CAUTIONS : Only works if PrmDtmfXferMode set to 1 in fcd file.

****************************************************************/

int SendUIIMsg(unsigned int channel);





/*****FUNCTION***************************************************

*        NAME : SendNonStdCmdMsg

* DESCRIPTION : A convenient function to send Nonstandard Command

*				Message (H.245).

*       INPUT : channel 

*      OUTPUT : None

*     RETURNS : 1 - success, 0 - fail

*    CAUTIONS : Only works if PrmDtmfXferMode set to 1 in fcd file.

****************************************************************/

int SendNonStdCmdMsg(unsigned int channel);





/*****FUNCTION***************************************************

*        NAME : SendFacilityMsg

* DESCRIPTION : A convenient function to send Q931 Facility message.

*       INPUT : channel 

*      OUTPUT : None

*     RETURNS : 1 - success, 0 - fail

*    CAUTIONS : 

****************************************************************/

int SendFacilityMsg(unsigned int channel);




/*****FUNCTION***************************************************
*        NAME : waitForKey
* DESCRIPTION : Thread waiting for key: q , ctrl+c to end application
*                                       c - get channel information
*                                       
*       INPUT : None
*      OUTPUT : None
*     RETURNS : unsigned long  '0' - success
*    CAUTIONS : getch() func disable detection of 
*               interrupts from the keyboard
****************************************************************/
unsigned long  waitForKey();


/*****FUNCTION***************************************************
*        NAME : printChanInfo
* DESCRIPTION : Prints channel information
*       INPUT : void
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void printChanInfo(char *, CHANInfo Info[]);


/*****FUNCTION***************************************************
*        NAME : banner
* DESCRIPTION : Prints program banner
*       INPUT : void
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void banner(void);


/*****FUNCTION***************************************************
*        NAME : usage
* DESCRIPTION : Command line option ? for help
*       INPUT : None
*      OUTPUT : Prints help text
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void usage();


/*****FUNCTION***************************************************
*        NAME : checkArg
* DESCRIPTION : Checks arguments from command line
*       INPUT : int argc
*               char *argv[]
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void checkArg(int argc, char *argv[]);


/*****FUNCTION***************************************************
*        NAME : IPTResetSession
* DESCRIPTION : Resets session structure to default values
*       INPUT : int ch     -   Channel to reset
*               int clear -   Boolean to know if reset totally
*                              1 - clear totaly
*                              0 - clear the related fields of this call
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void IPTResetSession(int ch, int clear);


/*****FUNCTION***************************************************
*        NAME : getGateChannels
* DESCRIPTION : Gets the gateChannels number to be the minimum
*               of PSTN channels and available IPT clusters
*       INPUT : None
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void getGateChannels();


/*****FUNCTION***************************************************
*        NAME : printConfiguration
* DESCRIPTION : Print information from confoguration file
*       INPUT : None
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void printConfiguration();


/*****FUNCTION***************************************************
*        NAME : ApplicationExit
* DESCRIPTION : Closes PSTN and IP resources and log files
*       INPUT : None
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void ApplicationExit();


/*****FUNCTION***************************************************
*        NAME : fallback_hdlr
* DESCRIPTION : The fallback handler for all events
*       INPUT : parm
*      OUTPUT : return value
*     RETURNS : 
*    CAUTIONS : None
****************************************************************/
long fallback_hdlr(); 


/*****FUNCTION***************************************************
*        NAME : closeChannel
* DESCRIPTION : close channel
*       INPUT : channel   -  Channel to close
*      OUTPUT : return value
*     RETURNS : FAIL or SUCCESS
*    CAUTIONS : None
****************************************************************/
int closeChannel(unsigned int channel);


/*****FUNCTION***************************************************
*        NAME : gateInitialize
* DESCRIPTION : Initializes the Camel Gateway demo:
*               gets argument from command line,
*               opens NetTSC instances,
*               gets information from configuration file,
*               opens VOX channels.
*       INPUT : int argc 
*               char *argv[]
*      OUTPUT : None
*     RETURNS : void
*    CAUTIONS : None
****************************************************************/
void gateInitialize(int argc, 
			     char *argv[]);


/* pointer to function ApplicationExit() */
  void (*ExitApp)();

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

#endif /* ndef _GATEMAIN_H */
/*** End of File ***/

⌨️ 快捷键说明

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