00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00020 #ifndef OO_H323EP_H_
00021 #define OO_H323EP_H_
00022 #include "ooCapability.h"
00023 #include "ooCalls.h"
00024 #include "ooConfig.h"
00025 #include "ooGkClient.h"
00026 #include "ooports.h"
00027 #include "ooq931.h"
00028
00029 #define DEFAULT_TRACEFILE "trace.log"
00030 #define DEFAULT_TERMTYPE 50
00031 #define DEFAULT_PRODUCTID "objsys"
00032 #define DEFAULT_CALLERID "objsyscall"
00033 #define DEFAULT_T35COUNTRYCODE 0xB5
00034 #define DEFAULT_T35EXTENSION 0
00035 #define DEFAULT_MANUFACTURERCODE 0x0036
00036 #define DEFAULT_H245CONNECTION_RETRYTIMEOUT 2
00037 #define DEFAULT_CALLESTB_TIMEOUT 60
00038 #define DEFAULT_MSD_TIMEOUT 30
00039 #define DEFAULT_TCS_TIMEOUT 30
00040 #define DEFAULT_LOGICALCHAN_TIMEOUT 30
00041 #define DEFAULT_ENDSESSION_TIMEOUT 15
00042 #define DEFAULT_H323PORT 1720
00043
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047
00048 #ifndef EXTERN
00049 #ifdef MAKE_DLL
00050 #define EXTERN __declspec(dllexport)
00051 #else
00052 #define EXTERN
00053 #endif
00054 #endif
00055
00056 struct OOCapPrefs;
00061
00062 #define TCPPORTSSTART 12030
00063 #define TCPPORTSEND 12230
00064 #define UDPPORTSSTART 13030
00065 #define UDPPORTSEND 13230
00066 #define RTPPORTSSTART 14030
00067 #define RTPPORTSEND 14230
00073 typedef struct OOH323Ports {
00074 int start;
00075 int max;
00076 int current;
00077 } OOH323Ports;
00078
00083 typedef struct OOH323EndPoint {
00084
00089 OOCTXT ctxt;
00090
00095 OOCTXT msgctxt;
00096
00097 char traceFile[MAXFILENAME];
00098 FILE * fptraceFile;
00099
00101 OOH323Ports tcpPorts;
00102
00104 OOH323Ports udpPorts;
00105
00107 OOH323Ports rtpPorts;
00108
00109 ASN1UINT flags;
00110
00111 int termType;
00112
00113
00114 int t35CountryCode;
00115 int t35Extension;
00116 int manufacturerCode;
00117 const char *productID;
00118 const char *versionID;
00119 const char *callerid;
00120 char callingPartyNumber[50];
00121 OOSOCKET *stackSocket;
00122 OOAliases *aliases;
00123
00124 int callType;
00125
00126 struct ooH323EpCapability *myCaps;
00127 OOCapPrefs capPrefs;
00128 int noOfCaps;
00129 OOH225MsgCallbacks h225Callbacks;
00130 OOH323CALLBACKS h323Callbacks;
00131 char signallingIP[20];
00132 int listenPort;
00133 OOSOCKET *listener;
00134 OOH323CallData *callList;
00135
00136 OOCallMode callMode;
00137 int dtmfmode;
00138 ASN1UINT callEstablishmentTimeout;
00139 ASN1UINT msdTimeout;
00140 ASN1UINT tcsTimeout;
00141 ASN1UINT logicalChannelTimeout;
00142 ASN1UINT sessionTimeout;
00143
00144 struct ooGkClient *gkClient;
00145
00146 OOInterface *ifList;
00147 OOBOOL isGateway;
00148 OOSOCKET cmdListener;
00149 OOSOCKET cmdSock;
00150 #ifdef _WIN32
00151 int cmdPort;
00152 #endif
00153
00157 enum Q931InformationTransferCapability bearercap;
00158
00159 } OOH323EndPoint;
00160
00161 #define ooEndPoint OOH323EndPoint
00162
00172 EXTERN int ooH323EpInitialize
00173 (enum OOCallMode callMode, const char* tracefile);
00174
00182 EXTERN int ooH323EpApplyConfig (const OOConfigFile* pconfig);
00183
00184 #ifdef _WIN32
00185
00194 EXTERN int ooH323EpCreateCmdListener(int cmdPort);
00195 #endif
00196
00203 EXTERN int ooH323EpSetAsGateway();
00204
00213 EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);
00214
00223 EXTERN int ooH323EpSetTCPPortRange(int base, int max);
00224
00233 EXTERN int ooH323EpSetUDPPortRange(int base, int max);
00234
00243 EXTERN int ooH323EpSetRTPPortRange(int base, int max);
00244
00251 EXTERN int ooH323EpSetTraceLevel(int traceLevel);
00252
00259 EXTERN int ooH323EpAddAliasH323ID(const char* h323id);
00260
00268 EXTERN int ooH323EpAddAliasDialedDigits(const char* dialedDigits);
00269
00276 EXTERN int ooH323EpAddAliasURLID(const char* url);
00277
00284 EXTERN int ooH323EpAddAliasEmailID(const char* email);
00285
00292 EXTERN int ooH323EpAddAliasTransportID(const char* ipaddress);
00293
00300 EXTERN int ooH323EpClearAllAliases(void);
00301
00309 EXTERN int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks);
00310
00319 EXTERN int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks);
00320
00321
00330 EXTERN int ooH323EpDestroy(void);
00331
00332
00339 EXTERN int ooH323EpEnableAutoAnswer(void);
00340
00347 EXTERN int ooH323EpDisableAutoAnswer(void);
00348
00357 EXTERN int ooH323EpEnableManualRingback(void);
00358
00366 EXTERN int ooH323EpDisableManualRingback(void);
00367
00373 EXTERN int ooH323EpEnableMediaWaitForConnect(void);
00374
00380 EXTERN int ooH323EpDisableMediaWaitForConnect(void);
00381
00387 EXTERN int ooH323EpEnableFastStart(void);
00388
00394 EXTERN int ooH323EpDisableFastStart(void);
00395
00401 EXTERN int ooH323EpEnableH245Tunneling(void);
00402
00408 EXTERN int ooH323EpDisableH245Tunneling(void);
00409
00415 EXTERN int ooH323EpEnableGkRouted(void);
00416
00422 EXTERN int ooH323EpDisableGkRouted(void);
00423
00430 EXTERN int ooH323EpSetProductID (const char * productID);
00431
00438 EXTERN int ooH323EpSetVersionID (const char * versionID);
00439
00447 EXTERN int ooH323EpSetCallerID (const char * callerID);
00448
00457 EXTERN int ooH323EpSetCallingPartyNumber(const char * number);
00458
00463 void ooH323EpPrintConfig(void);
00464
00465
00479 EXTERN int ooH323EpAddG728Capability
00480 (int cap, int txframes, int rxframes, int dir,
00481 cb_StartReceiveChannel startReceiveChannel,
00482 cb_StartTransmitChannel startTransmitChannel,
00483 cb_StopReceiveChannel stopReceiveChannel,
00484 cb_StopTransmitChannel stopTransmitChannel);
00485
00499 EXTERN int ooH323EpAddG729Capability
00500 (int cap, int txframes, int rxframes, int dir,
00501 cb_StartReceiveChannel startReceiveChannel,
00502 cb_StartTransmitChannel startTransmitChannel,
00503 cb_StopReceiveChannel stopReceiveChannel,
00504 cb_StopTransmitChannel stopTransmitChannel);
00505
00506
00521 EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
00522 OOBOOL silenceSuppression, int dir,
00523 cb_StartReceiveChannel startReceiveChannel,
00524 cb_StartTransmitChannel startTransmitChannel,
00525 cb_StopReceiveChannel stopReceiveChannel,
00526 cb_StopTransmitChannel stopTransmitChannel);
00527
00541 EXTERN int ooH323EpAddG711Capability
00542 (int cap, int txframes, int rxframes, int dir,
00543 cb_StartReceiveChannel startReceiveChannel,
00544 cb_StartTransmitChannel startTransmitChannel,
00545 cb_StopReceiveChannel stopReceiveChannel,
00546 cb_StopTransmitChannel stopTransmitChannel);
00547
00548
00563 EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
00564 OOBOOL comfortNoise,OOBOOL scrambled,int dir,
00565 cb_StartReceiveChannel startReceiveChannel,
00566 cb_StartTransmitChannel startTransmitChannel,
00567 cb_StopReceiveChannel stopReceiveChannel,
00568 cb_StopTransmitChannel stopTransmitChannel);
00593 EXTERN int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
00594 unsigned qcifMPI, unsigned cifMPI,
00595 unsigned cif4MPI, unsigned cif16MPI,
00596 unsigned maxBitRate, int dir,
00597 cb_StartReceiveChannel startReceiveChannel,
00598 cb_StartTransmitChannel startTransmitChannel,
00599 cb_StopReceiveChannel stopReceiveChannel,
00600 cb_StopTransmitChannel stopTransmitChannel);
00601
00608 EXTERN int ooH323EpEnableDTMFRFC2833(int dynamicRTPPayloadType);
00609
00615 EXTERN int ooH323EpDisableDTMFRFC2833(void);
00616
00622 EXTERN int ooH323EpEnableDTMFH245Alphanumeric();
00623
00629 EXTERN int ooH323EpDisableDTMFH245Alphanumeric();
00630
00636 EXTERN int ooH323EpEnableDTMFH245Signal();
00637
00643 EXTERN int ooH323EpDisableDTMFH245Signal();
00644
00655 EXTERN int ooH323EpSetGkClientCallbacks(OOGKCLIENTCALLBACKS gkClientCallbacks);
00656
00667 EXTERN int ooH323EpSetBearerCap (const char* configText);
00668
00672 #ifdef __cplusplus
00673 }
00674 #endif
00675
00676 #endif