Objective Systems, Inc.  

ooh323ep.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2005 by Objective Systems, Inc.
00003  *
00004  * This software is furnished under an open source license and may be 
00005  * used and copied only in accordance with the terms of this license. 
00006  * The text of the license may generally be found in the root 
00007  * directory of this installation in the COPYING file.  It 
00008  * can also be viewed online at the following URL:
00009  *
00010  *   http://www.obj-sys.com/open/license.html
00011  *
00012  * Any redistributions of this file including modified versions must 
00013  * maintain this copyright notice.
00014  *
00015  *****************************************************************************/
00020 #ifndef OO_H323EP_H_
00021 #define OO_H323EP_H_
00022 #include "ooCapability.h"
00023 #include "ooCalls.h"
00024 #include "ooGkClient.h"
00025 #include "ooports.h"
00026 #include "ooq931.h"
00027 
00028 #define DEFAULT_TRACEFILE "trace.log"
00029 #define DEFAULT_TERMTYPE 50
00030 #define DEFAULT_PRODUCTID  "objsys"
00031 #define DEFAULT_CALLERID   "objsyscall"
00032 #define DEFAULT_T35COUNTRYCODE 1
00033 #define DEFAULT_T35EXTENSION 0
00034 #define DEFAULT_MANUFACTURERCODE 71
00035 #define DEFAULT_H245CONNECTION_RETRYTIMEOUT 2
00036 #define DEFAULT_CALLESTB_TIMEOUT 60
00037 #define DEFAULT_MSD_TIMEOUT 30
00038 #define DEFAULT_TCS_TIMEOUT 30
00039 #define DEFAULT_LOGICALCHAN_TIMEOUT 30
00040 #define DEFAULT_ENDSESSION_TIMEOUT 15
00041 #define DEFAULT_H323PORT 1720
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046 
00047 #ifndef EXTERN
00048 #ifdef MAKE_DLL
00049 #define EXTERN __declspec(dllexport)
00050 #else
00051 #define EXTERN
00052 #endif /* MAKE_DLL */
00053 #endif /* EXTERN */
00054 
00055 struct OOCapPrefs;
00060 /* Default port ranges */
00061 #define TCPPORTSSTART 12030  
00062 #define TCPPORTSEND   12230  
00063 #define UDPPORTSSTART 13030  
00064 #define UDPPORTSEND   13230  
00065 #define RTPPORTSSTART 14030  
00066 #define RTPPORTSEND   14230  
00075 typedef struct OOH323Ports {
00076    int start;    
00077    int max;      
00078    int current;  
00079 } OOH323Ports;
00080 
00085 typedef struct OOH323EndPoint {
00086    
00091    OOCTXT ctxt;
00092 
00097    OOCTXT msgctxt;
00098 
00099    char   traceFile[MAXFILENAME];
00100    FILE * fptraceFile;
00101 
00103    OOH323Ports tcpPorts;
00104 
00106    OOH323Ports udpPorts;
00107 
00109    OOH323Ports rtpPorts;
00110   
00111    ASN1UINT  flags;
00112 
00113    int termType; /* 50 - Terminal entity with No MC, 
00114                     60 - Gateway entity with no MC, 
00115                     70 - Terminal Entity with MC, but no MP etc.*/
00116    int t35CountryCode;
00117    int t35Extension;
00118    int manufacturerCode;
00119    const char *productID;
00120    const char *versionID;
00121    const char *callerid;
00122    char callingPartyNumber[50];
00123    OOSOCKET *stackSocket;
00124    OOAliases *aliases;
00125 
00126    int callType;
00127 
00128    struct ooH323EpCapability *myCaps;
00129    OOCapPrefs     capPrefs;
00130    int noOfCaps;
00131    OOH225MsgCallbacks h225Callbacks;
00132    OOH323CALLBACKS h323Callbacks;
00133    char signallingIP[20];
00134    int listenPort;
00135    OOSOCKET *listener;
00136    OOH323CallData *callList;
00137 
00138    OOCallMode callMode; /* audio/audiorx/audiotx/video/fax */
00139    int dtmfmode;
00140    ASN1UINT callEstablishmentTimeout;
00141    ASN1UINT msdTimeout;
00142    ASN1UINT tcsTimeout;
00143    ASN1UINT logicalChannelTimeout;
00144    ASN1UINT sessionTimeout;
00145    int cmdPipe[2];
00146    struct ooGkClient *gkClient;
00147 
00148    OOInterface *ifList; /* interface list for the host we are running on*/
00149    OOBOOL isGateway;
00150    OOSOCKET cmdListener;
00151    OOSOCKET cmdSock;
00152   int cmdPort; /* default 7575 */
00153 } OOH323EndPoint;
00154 
00155 #define ooEndPoint OOH323EndPoint
00156 
00166 EXTERN int ooH323EpInitialize
00167    (enum OOCallMode callMode, const char* tracefile);
00168 
00169 
00170 
00180 EXTERN int ooH323EpCreateCmdListener(int cmdPort);
00181 
00188 EXTERN int ooH323EpSetAsGateway();
00189 
00198 EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);
00199 
00208 EXTERN int ooH323EpSetTCPPortRange(int base, int max);
00209 
00218 EXTERN int ooH323EpSetUDPPortRange(int base, int max);
00219 
00228 EXTERN int ooH323EpSetRTPPortRange(int base, int max);
00229 
00236 EXTERN int ooH323EpSetTraceLevel(int traceLevel);
00237 
00244 EXTERN int ooH323EpAddAliasH323ID(const char* h323id);
00245 
00253 EXTERN int ooH323EpAddAliasDialedDigits(const char* dialedDigits);
00254 
00261 EXTERN int ooH323EpAddAliasURLID(const char* url);
00262 
00269 EXTERN int ooH323EpAddAliasEmailID(const char* email);
00270 
00277 EXTERN int ooH323EpAddAliasTransportID(const char* ipaddress);
00278 
00285 EXTERN int ooH323EpClearAllAliases(void);
00286 
00294 EXTERN int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks);
00295 
00304 EXTERN int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks);
00305 
00306 
00315 EXTERN int ooH323EpDestroy(void);
00316 
00317 
00324 EXTERN int ooH323EpEnableAutoAnswer(void);
00325 
00332 EXTERN int ooH323EpDisableAutoAnswer(void);
00333 
00342 EXTERN int ooH323EpEnableManualRingback(void);
00343 
00351 EXTERN int ooH323EpDisableManualRingback(void);
00352 
00358 EXTERN int ooH323EpDisableMediaWaitForConnect(void);
00359 
00365 EXTERN int ooH323EpDisableMediaWaitForConnect(void);
00366 
00372 EXTERN int ooH323EpEnableFastStart(void);
00373 
00379 EXTERN int ooH323EpDisableFastStart(void);
00380 
00386 EXTERN int ooH323EpEnableH245Tunneling(void);
00387 
00393 EXTERN int ooH323EpDisableH245Tunneling(void);
00394 
00400 EXTERN int ooH323EpEnableGkRouted(void);
00401 
00407 EXTERN int ooH323EpDisableGkRouted(void);
00408 
00415 EXTERN int ooH323EpSetProductID (const char * productID);
00416 
00423 EXTERN int ooH323EpSetVersionID (const char * versionID);
00424 
00432 EXTERN int ooH323EpSetCallerID (const char * callerID);
00433 
00442 EXTERN int ooH323EpSetCallingPartyNumber(const char * number);
00443 
00448 void ooH323EpPrintConfig(void);
00449 
00450 
00464 EXTERN int ooH323EpAddG728Capability
00465    (int cap, int txframes, int rxframes, int dir, 
00466     cb_StartReceiveChannel startReceiveChannel,
00467     cb_StartTransmitChannel startTransmitChannel,
00468     cb_StopReceiveChannel stopReceiveChannel,
00469     cb_StopTransmitChannel stopTransmitChannel);
00470 
00484 EXTERN int ooH323EpAddG729Capability
00485    (int cap, int txframes, int rxframes, int dir, 
00486     cb_StartReceiveChannel startReceiveChannel,
00487     cb_StartTransmitChannel startTransmitChannel,
00488     cb_StopReceiveChannel stopReceiveChannel,
00489     cb_StopTransmitChannel stopTransmitChannel);
00490 
00491 
00506 EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes, 
00507                               OOBOOL silenceSuppression, int dir,
00508                               cb_StartReceiveChannel startReceiveChannel,
00509                               cb_StartTransmitChannel startTransmitChannel,
00510                               cb_StopReceiveChannel stopReceiveChannel,
00511                               cb_StopTransmitChannel stopTransmitChannel);
00512 
00526 EXTERN int ooH323EpAddG711Capability
00527    (int cap, int txframes, int rxframes, int dir, 
00528     cb_StartReceiveChannel startReceiveChannel,
00529     cb_StartTransmitChannel startTransmitChannel,
00530     cb_StopReceiveChannel stopReceiveChannel,
00531     cb_StopTransmitChannel stopTransmitChannel);
00532 
00533 
00548 EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt, 
00549                              OOBOOL comfortNoise,OOBOOL scrambled,int dir, 
00550                              cb_StartReceiveChannel startReceiveChannel,
00551                              cb_StartTransmitChannel startTransmitChannel,
00552                              cb_StopReceiveChannel stopReceiveChannel,
00553                              cb_StopTransmitChannel stopTransmitChannel);
00578 EXTERN int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI, 
00579                                  unsigned qcifMPI, unsigned cifMPI, 
00580                                  unsigned cif4MPI, unsigned cif16MPI, 
00581                                  unsigned maxBitRate, int dir, 
00582                                  cb_StartReceiveChannel startReceiveChannel,
00583                                  cb_StartTransmitChannel startTransmitChannel,
00584                                  cb_StopReceiveChannel stopReceiveChannel,
00585                                  cb_StopTransmitChannel stopTransmitChannel);
00586 
00593 EXTERN int ooH323EpEnableDTMFRFC2833(int dynamicRTPPayloadType);
00594 
00600 EXTERN int ooH323EpDisableDTMFRFC2833(void);
00601 
00607 EXTERN int ooH323EpEnableDTMFH245Alphanumeric();
00608 
00614 EXTERN int ooH323EpDisableDTMFH245Alphanumeric();
00615 
00621 EXTERN int ooH323EpEnableDTMFH245Signal();
00622 
00628 EXTERN int ooH323EpDisableDTMFH245Signal();
00629 
00640 EXTERN int ooH323EpSetGkClientCallbacks(OOGKCLIENTCALLBACKS gkClientCallbacks);
00641 
00645 #ifdef __cplusplus
00646 }
00647 #endif
00648 
00649 #endif

This file was last modified on 25 Jan 2007.
Objective Open H.323 Stack, 0.8.3