ooh323ep.h

来自「一个非常美妙的proxy。功能强大。基于sip的协议。如果还要的话」· C头文件 代码 · 共 617 行 · 第 1/2 页

H
617
字号
/* * Copyright (C) 2004-2005 by Objective Systems, Inc. * * This software is furnished under an open source license and may be  * used and copied only in accordance with the terms of this license.  * The text of the license may generally be found in the root  * directory of this installation in the COPYING file.  It  * can also be viewed online at the following URL: * *   http://www.obj-sys.com/open/license.html * * Any redistributions of this file including modified versions must  * maintain this copyright notice. * *****************************************************************************//** * @file ooh323ep.h  * This file contains H323 endpoint related functions.  */#ifndef OO_H323EP_H_#define OO_H323EP_H_#include "ooCapability.h"#include "ooCalls.h"#include "ooGkClient.h"#include "ooports.h"#include "ooq931.h"#define DEFAULT_TRACEFILE "trace.log"#define DEFAULT_TERMTYPE 50#define DEFAULT_PRODUCTID  "objsys"#define DEFAULT_CALLERID   "objsyscall"#define DEFAULT_T35COUNTRYCODE 1#define DEFAULT_T35EXTENSION 0#define DEFAULT_MANUFACTURERCODE 71#define DEFAULT_H245CONNECTION_RETRYTIMEOUT 2#define DEFAULT_CALLESTB_TIMEOUT 60#define DEFAULT_MSD_TIMEOUT 30#define DEFAULT_TCS_TIMEOUT 30#define DEFAULT_LOGICALCHAN_TIMEOUT 30#define DEFAULT_ENDSESSION_TIMEOUT 15#define DEFAULT_H323PORT 1720#ifdef __cplusplusextern "C" {#endif#ifndef EXTERN#ifdef MAKE_DLL#define EXTERN __declspec(dllexport)#else#define EXTERN#endif /* MAKE_DLL */#endif /* EXTERN */struct OOCapPrefs;/**  * @defgroup h323ep  H323 Endpoint management functions * @{ *//* Default port ranges */#define TCPPORTSSTART 12030  /*!< Starting TCP port number */#define TCPPORTSEND   12230  /*!< Ending TCP port number   */#define UDPPORTSSTART 13030  /*!< Starting UDP port number */#define UDPPORTSEND   13230  /*!< Ending UDP port number   */#define RTPPORTSSTART 14030  /*!< Starting RTP port number */#define RTPPORTSEND   14230  /*!< Ending RTP port number   */  /** * This structure is used to define the port ranges to be used * by the application. */typedef struct OOH323Ports {   int start;    /*!< Starting port number. */   int max;      /*!< Maximum port number.  */   int current;  /*!< Current port number.  */} OOH323Ports;/**  * Structure to store all configuration information related to the * endpoint created by an application  */typedef struct OOH323EndPoint {      /**     * This context should be used for allocation of memory for    * items within the endpoint structure.    */   OOCTXT ctxt;   /**     * This context should be used for allocation of memory for    * message structures.    */   OOCTXT msgctxt;   char   traceFile[MAXFILENAME];   FILE * fptraceFile;   /** Range of port numbers to be used for TCP connections */   OOH323Ports tcpPorts;   /** Range of port numbers to be used for UDP connections */   OOH323Ports udpPorts;   /** Range of port numbers to be used for RTP connections */   OOH323Ports rtpPorts;     ASN1UINT  flags;   int termType; /* 50 - Terminal entity with No MC,                     60 - Gateway entity with no MC,                     70 - Terminal Entity with MC, but no MP etc.*/   int t35CountryCode;   int t35Extension;   int manufacturerCode;   const char *productID;   const char *versionID;   const char *callerid;   char callingPartyNumber[50];   OOSOCKET *stackSocket;   OOAliases *aliases;   int callType;   struct ooH323EpCapability *myCaps;   OOCapPrefs     capPrefs;   int noOfCaps;   OOH225MsgCallbacks h225Callbacks;   OOH323CALLBACKS h323Callbacks;   char signallingIP[20];   int listenPort;   OOSOCKET *listener;   OOH323CallData *callList;   OOCallMode callMode; /* audio/audiorx/audiotx/video/fax */   int dtmfmode;   ASN1UINT callEstablishmentTimeout;   ASN1UINT msdTimeout;   ASN1UINT tcsTimeout;   ASN1UINT logicalChannelTimeout;   ASN1UINT sessionTimeout;   int cmdPipe[2];   struct ooGkClient *gkClient;   OOInterface *ifList; /* interface list for the host we are running on*/   OOBOOL isGateway;   OOSOCKET cmdListener;   OOSOCKET cmdSock;  int cmdPort; /* default 7575 */} OOH323EndPoint;#define ooEndPoint OOH323EndPoint/** * This function is the first function to be invoked before using stack. It * initializes the H323 Endpoint. * @param callMode       Type of calls to be made(audio/video/fax). *                       (OO_CALLMODE_AUDIO, OO_CALLMODE_VIDEO) * @param tracefile      Trace file name. * * @return               OO_OK, on success. OO_FAILED, on failure */EXTERN int ooH323EpInitialize   (enum OOCallMode callMode, const char* tracefile);/** * This function is used to create a command listener for the endpoint. * Before any command is issued to the endpoint, command listener must be * created. * @param cmdPort          Port number on which command listener waits for *                         incoming requests. *  * @return                 OO_OK, on success; OO_FAILED, on failure */EXTERN int ooH323EpCreateCmdListener(int cmdPort);/** * This function is used to represent the H.323 application endpoint as  * gateway, instead of an H.323 phone endpoint. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpSetAsGateway();/** * This function is used to assign a local ip address to be used for call * signalling. * @param localip        Dotted IP address to be used for call signalling. * @param listenport     Port to be used for listening for incoming calls. * * @return               OO_OK, on success. OO_FAILED, on failure. */ EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);/** * This function is used to set the range of tcp ports the application will * use for tcp transport. * @param base           Starting port number for the range * @param max            Ending port number for the range. * * @return               OO_OK, on success. OO_FAILED, on failure.     */EXTERN int ooH323EpSetTCPPortRange(int base, int max);/** * This function is used to set the range of udp ports the application will * use for udp transport. * @param base           Starting port number for the range * @param max            Ending port number for the range. * * @return               OO_OK, on success. OO_FAILED, on failure.     */EXTERN int ooH323EpSetUDPPortRange(int base, int max);/** * This function is used to set the range of rtp ports the application will * use for media streams. * @param base           Starting port number for the range * @param max            Ending port number for the range. * * @return               OO_OK, on success. OO_FAILED, on failure.     */EXTERN int ooH323EpSetRTPPortRange(int base, int max);/** * This function is used to set the trace level for the H.323 endpoint. * @param traceLevel     Level of tracing. * * @return               OO_OK, on success. OO_FAILED, otherwise. */EXTERN int ooH323EpSetTraceLevel(int traceLevel);/** * This function is used to add the h323id alias for the endpoint. * @param h323id         H323-ID to be set as alias. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpAddAliasH323ID(const char* h323id);/** * This function is used to add the dialed digits alias for the * endpoint. * @param dialedDigits   Dialed-Digits to be set as alias. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpAddAliasDialedDigits(const char* dialedDigits);/** * This function is used to add the url alias for the endpoint. * @param url            URL to be set as an alias. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpAddAliasURLID(const char* url);/** * This function is used to add an email id as an alias for the endpoint. * @param email          Email id to be set as an alias. *  * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpAddAliasEmailID(const char* email);/** * This function is used to add an ip address as an alias. * @param ipaddress      IP address to be set as an alias. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpAddAliasTransportID(const char* ipaddress);/** * This function is used to clear all the aliases used by the  * H323 endpoint. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpClearAllAliases(void);/** * This function is used to set the H225 message callbacks for the * endpoint. * @param h225Callbacks  Callback structure containing various callbacks. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks);/** * This function is used to set high level H.323 callbacks for the endpoint. * Make sure all unused callbacks in the structure are set to NULL before  * calling this function. * @param h323Callbacks    Callback structure containing various high level  *                         callbacks. * @return                 OO_OK, on success. OO_FAILED, on failure */EXTERN int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks);/** * This function is the last function to be invoked after done using the  * stack. It closes the H323 Endpoint for an application, releasing all 

⌨️ 快捷键说明

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