sipXtapi.h

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2007 Robert J. Andreasen, Jr.
00003 // Licensed to SIPfoundry under a Contributor Agreement. 
00004 //
00005 // Copyright (C) 2005-2006 SIPez LLC.
00006 // Licensed to SIPfoundry under a Contributor Agreement.
00007 //
00008 // Copyright (C) 2004-2006 SIPfoundry Inc.
00009 // Licensed by SIPfoundry under the LGPL license.
00010 //
00011 // Copyright (C) 2004-2006 Pingtel Corp.  All rights reserved.
00012 // Licensed to SIPfoundry under a Contributor Agreement.
00013 //
00014 // $$
00016 
00030 #ifndef _sipXtapi_h_
00031 #define _sipXtapi_h_
00032 
00033 #include <memory.h>
00034 #include <string.h>
00035 #include <stddef.h>       // size_t
00036 
00037 // SYSTEM INCLUDES
00038 #ifdef DIRECT_SHOW_RENDER
00039 #include <windows.h>
00040 #include <Unknwn.h>
00041 #    if !defined __strmif_h__
00042 #        include <strmif.h>
00043 #    endif 
00044 #endif
00045 
00046 // APPLICATION INCLUDES
00047 
00048 // DEFINES
00049 
00055 #ifdef SIPX_USE_STDCALL
00056 #define SIPX_CALLING_CONVENTION __stdcall
00057 #else
00058 #define SIPX_CALLING_CONVENTION
00059 #endif 
00060 
00061 #define DEFAULT_UDP_PORT        5060    
00062 #define DEFAULT_TCP_PORT        5060    
00063 #define DEFAULT_TLS_PORT        5061    
00064 #define DEFAULT_RTP_START_PORT  9000    
00068 #define DEFAULT_STUN_PORT       3478    
00070 #define DEFAULT_CONNECTIONS     32      
00071 #define DEFAULT_IDENTITY        "sipx"  
00074 #define DEFAULT_BIND_ADDRESS    "0.0.0.0" 
00076 #define CODEC_G711_PCMU         "258"   
00077 #define CODEC_G711_PCMA         "257"   
00078 #define CODEC_DTMF_RFC2833      "128"   
00080 #define GAIN_MIN                0       
00081 #define GAIN_MAX                100     
00082 #define GAIN_DEFAULT            70      
00084 #define VOLUME_MIN              1       
00085 #define VOLUME_MAX              100     
00086 #define VOLUME_DEFAULT          70      
00088 #define MAX_AUDIO_DEVICES       16      
00089 #define MAX_VIDEO_DEVICES       8       
00090 #define MAX_VIDEO_DEVICE_LENGTH 256     
00092 #define CONF_MAX_CONNECTIONS    32      
00093 #define SIPX_MAX_IP_ADDRESSES   32      
00094 #define SIPX_MAX_CALLS          64      
00098 #define SIPX_PORT_DISABLE       -1      
00101 #define SIPX_PORT_AUTO          -2      
00106 #define SIPXTAPI_VERSION_STRING "sipXtapi SDK %s.%s %s (built %s)" 
00107 #define SIPXTAPI_VERSION        "2.9.1"      
00109 #define SIPXTAPI_BUILDNUMBER "0"             
00111 #define SIPXTAPI_BUILD_WORD 2,9,1,0          
00113 #define SIPXTAPI_FULL_VERSION "2.9.1.0"      
00115 #define SIPXTAPI_BUILDDATE "0000-00-00"      
00117 #define SIPX_MAX_ADAPTER_NAME_LENGTH 256     
00119 #if defined(_WIN32)
00120 #  ifdef SIPXTAPI_EXPORTS
00121 #    define SIPXTAPI_API extern "C" __declspec(dllexport)  
00122 #  elif defined(SIPXTAPI_STATIC)
00123 #    define SIPXTAPI_API extern "C"  
00124 #  else
00125 #    define SIPXTAPI_API extern "C" __declspec(dllimport)  
00126 #  endif
00127 #else
00128 #  define SIPXTAPI_API extern "C"   
00129 #endif
00130 
00131 // MACROS
00132 // EXTERNAL FUNCTIONS
00133 // EXTERNAL VARIABLES
00134 // CONSTANTS
00135 
00136 // FORWARD DECLARATIONS
00137 class securityHelper;
00138 
00139 // STRUCTS
00140 
00141 // TYPEDEFS
00146 typedef enum SPEAKER_TYPE
00147 {
00148     SPEAKER,    
00149     RINGER      
00150 } SPEAKER_TYPE ;
00151 
00172 typedef enum SIPX_AUDIO_BANDWIDTH_ID
00173 {
00174     AUDIO_CODEC_BW_VARIABLE=0,   
00176     AUDIO_CODEC_BW_LOW,          
00177     AUDIO_CODEC_BW_NORMAL,       
00178     AUDIO_CODEC_BW_HIGH,         
00180     AUDIO_CODEC_BW_CUSTOM,       
00183     AUDIO_CODEC_BW_DEFAULT       
00186 } SIPX_AUDIO_BANDWIDTH_ID;
00187 
00188 
00204 typedef enum SIPX_VIDEO_BANDWIDTH_ID
00205 {
00206     VIDEO_CODEC_BW_VARIABLE=0,   
00207     VIDEO_CODEC_BW_LOW,          
00208     VIDEO_CODEC_BW_NORMAL,       
00209     VIDEO_CODEC_BW_HIGH,         
00210     VIDEO_CODEC_BW_CUSTOM,       
00213     VIDEO_CODEC_BW_DEFAULT       
00215 } SIPX_VIDEO_BANDWIDTH_ID;
00216 
00221 typedef enum SIPX_VIDEO_QUALITY_ID
00222 {
00223     VIDEO_QUALITY_LOW=1,         
00224     VIDEO_QUALITY_NORMAL=2,      
00225     VIDEO_QUALITY_HIGH=3         
00226 } SIPX_VIDEO_QUALITY_ID;
00227 
00231 typedef enum SIPX_VIDEO_FORMAT
00232 {
00233     VIDEO_FORMAT_CIF=0,          
00234     VIDEO_FORMAT_QCIF,           
00235     VIDEO_FORMAT_SQCIF,          
00236     VIDEO_FORMAT_QVGA            
00237 } SIPX_VIDEO_FORMAT;
00238 
00239 
00243 typedef enum SIPX_AUDIO_DATA_FORMAT
00244 {
00245     RAW_PCM_16=0                 
00246 } SIPX_AUDIO_DATA_FORMAT;
00247 
00248 
00255 typedef void (*sipxLogCallback)(const char* szPriority,
00256                                 const char* szSource,
00257                                 const char* szMsg);
00258 
00262 typedef enum SIPX_RESULT 
00263 {
00264     SIPX_RESULT_SUCCESS = 0,         
00265     SIPX_RESULT_FAILURE,             
00266     SIPX_RESULT_NOT_IMPLEMENTED,     
00267     SIPX_RESULT_OUT_OF_MEMORY,       
00268     SIPX_RESULT_INVALID_ARGS,        
00270     SIPX_RESULT_BAD_ADDRESS,         
00271     SIPX_RESULT_OUT_OF_RESOURCES,    
00272     SIPX_RESULT_INSUFFICIENT_BUFFER, 
00273     SIPX_RESULT_EVAL_TIMEOUT,        
00274     SIPX_RESULT_BUSY,                
00275     SIPX_RESULT_INVALID_STATE,       
00279     SIPX_RESULT_MISSING_RUNTIME_FILES,
00280     SIPX_RESULT_TLS_DATABASE_FAILURE, 
00281     SIPX_RESULT_TLS_BAD_PASSWORD,     
00282     SIPX_RESULT_TLS_TCP_IMPORT_FAILURE, 
00283     SIPX_RESULT_NSS_FAILURE,          
00284     SIPX_RESULT_NOT_SUPPORTED,        
00285     SIPX_RESULT_NETWORK_FAILURE       
00287 } SIPX_RESULT ;
00288 
00292 typedef enum SIPX_TONE_ID
00293 {
00294     ID_DTMF_INVALID        = 0,     
00296     ID_DTMF_0              = '0',   
00297     ID_DTMF_1              = '1',   
00298     ID_DTMF_2              = '2',   
00299     ID_DTMF_3              = '3',   
00300     ID_DTMF_4              = '4',   
00301     ID_DTMF_5              = '5',   
00302     ID_DTMF_6              = '6',   
00303     ID_DTMF_7              = '7',   
00304     ID_DTMF_8              = '8',   
00305     ID_DTMF_9              = '9',   
00306     ID_DTMF_STAR           = '*',   
00307     ID_DTMF_POUND          = '#',   
00308     ID_DTMF_FLASH          = '!',   
00309     ID_TONE_DIALTONE  = 512,        
00311     ID_TONE_BUSY,                   
00313     ID_TONE_RINGBACK,               
00315     ID_TONE_RINGTONE,               
00317     ID_TONE_CALLFAILED,             
00319     ID_TONE_SILENCE,                
00321     ID_TONE_BACKSPACE,              
00323     ID_TONE_CALLWAITING,            
00325     ID_TONE_CALLHELD,               
00327     ID_TONE_LOUD_FAST_BUSY          
00329 } SIPX_TONE_ID ;                 
00330 
00331 typedef SIPX_TONE_ID TONE_ID  ;     
00345 typedef enum SIPX_LOG_LEVEL
00346 {
00347     LOG_LEVEL_DEBUG,     
00348     LOG_LEVEL_INFO,      
00349     LOG_LEVEL_NOTICE,    
00350     LOG_LEVEL_WARNING,   
00351     LOG_LEVEL_ERR,       
00352     LOG_LEVEL_CRIT,      
00353     LOG_LEVEL_ALERT,     
00354     LOG_LEVEL_EMERG,     
00355     LOG_LEVEL_NONE,      
00356 } SIPX_LOG_LEVEL ;
00357 
00358 #define MAX_SRTP_KEY_LENGTH   31        
00359 #define MAX_SMIME_KEY_LENGTH  2048      
00360 #define MAX_PKCS12_KEY_LENGTH 4096      
00361 #define MAX_PASSWORD_LENGTH   32        
00366 enum SIPX_SRTP_LEVEL
00367 {
00368     SRTP_LEVEL_NONE=0,
00369     SRTP_LEVEL_ENCRYPTION,
00370     SRTP_LEVEL_AUTHENTICATION,
00371     SRTP_LEVEL_ENCRYPTION_AND_AUTHENTICATION
00372 };
00373 
00377 class SIPX_SECURITY_ATTRIBUTES
00378 {
00379   public:
00380     friend class SecurityHelper;    
00382     SIPX_SECURITY_ATTRIBUTES() 
00383     {
00384         nSrtpKeyLength = 0 ;
00385         nSmimeKeyLength = 0 ;
00386         nSrtpLevel = SRTP_LEVEL_NONE ;
00387         memset(szSrtpKey, 0, sizeof(szSrtpKey));
00388         memset(szSmimeKeyDer, 0, sizeof(szSmimeKeyDer));
00389         memset(dbLocation, 0, sizeof(dbLocation));
00390         memset(szMyCertNickname, 0, sizeof(szMyCertNickname));
00391         memset(szCertDbPassword, 0, sizeof(szCertDbPassword));
00392     }    
00394     SIPX_SECURITY_ATTRIBUTES(const SIPX_SECURITY_ATTRIBUTES& ref)
00395     {
00396         copyData(ref);
00397     }    
00399     virtual ~SIPX_SECURITY_ATTRIBUTES() { }    
00401     SIPX_SECURITY_ATTRIBUTES& operator=(const SIPX_SECURITY_ATTRIBUTES& ref)
00402     {
00403         if (this == &ref) return *this;
00404         copyData(ref);
00405         return *this;
00406     }    
00411     void setSrtpKey(const char* szKey, const int length)
00412     {
00413         int safeLen = (length < (int) sizeof(szSrtpKey)) ? length : (int) sizeof(szSrtpKey);
00414         memcpy(szSrtpKey, szKey, safeLen);
00415         nSrtpKeyLength = safeLen;
00416     }    
00421     void setSmimeKey(const char* szKey, const int length)
00422     {
00423         int safeLen = (length < (int) sizeof(szSmimeKeyDer)) ? length : (int) sizeof(szSmimeKeyDer);
00424         memcpy(szSmimeKeyDer, szKey, safeLen);
00425         nSmimeKeyLength = safeLen;
00426     }
00430     void setSecurityLevel(SIPX_SRTP_LEVEL security) { nSrtpLevel = security; }
00434     const char* getSrtpKey() const  { return szSrtpKey; }    
00439     const char* getSmimeKey() const { return szSmimeKeyDer; }
00443     const int getSrtpKeyLength() const  { return nSrtpKeyLength; }
00448     const int getSmimeKeyLength() const { return nSmimeKeyLength; }
00452     const int getSecurityLevel() const {return nSrtpLevel;}
00458     const char* getCertDbLocation() const { return dbLocation; }
00459   private:
00460     SIPX_SRTP_LEVEL nSrtpLevel;
00461     char szSrtpKey[MAX_SRTP_KEY_LENGTH];
00462     int  nSrtpKeyLength;    
00463     char szSmimeKeyDer[MAX_SMIME_KEY_LENGTH];
00464     int  nSmimeKeyLength; 
00465     // internally set private member, use sipxConfigSetSecurityParameters
00466     char dbLocation[256];                         
00467     // internally set private member, use sipxConfigSetSecurityParameters
00468     char szMyCertNickname[32];   
00469     // internally set private member, use sipxConfigSetSecurityParameters
00470     char szCertDbPassword[MAX_PASSWORD_LENGTH];   
00471     void copyData(const SIPX_SECURITY_ATTRIBUTES& ref)
00472     {
00473         nSrtpLevel = ref.nSrtpLevel;
00474         nSrtpKeyLength = ref.nSrtpKeyLength;
00475         nSmimeKeyLength = ref.nSmimeKeyLength;
00476         memcpy(szSrtpKey, ref.szSrtpKey, ref.nSrtpKeyLength);
00477         memcpy(szSmimeKeyDer, ref.szSmimeKeyDer, ref.nSmimeKeyLength);
00478         strncpy(dbLocation, ref.dbLocation, sizeof(dbLocation) - 1);
00479         strncpy(szMyCertNickname, ref.szMyCertNickname, sizeof(szMyCertNickname) - 1);
00480         strncpy(szCertDbPassword, ref.szCertDbPassword, sizeof(szCertDbPassword) - 1);
00481     }
00482 };
00483 
00492 typedef enum
00493 {
00494     CONTACT_LOCAL,      
00495     CONTACT_NAT_MAPPED, 
00496     CONTACT_RELAY,      
00497     CONTACT_CONFIG,     
00499     CONTACT_AUTO = -1,  
00501     CONTACT_ALL = -2
00502 } SIPX_CONTACT_TYPE ;
00503 
00509 typedef enum
00510 {
00511     TRANSPORT_UDP = 1,  
00512     TRANSPORT_TCP = 0,  
00513     TRANSPORT_TLS = 3,  
00514     TRANSPORT_CUSTOM = 4 
00515 } SIPX_TRANSPORT_TYPE;
00516 
00521 typedef void* SIPX_WINDOW_HANDLE;
00522 
00527 typedef enum SIPX_VIDEO_DISPLAY_TYPE
00528 {
00529     SIPX_WINDOW_HANDLE_TYPE,     
00531     DIRECT_SHOW_FILTER           
00533 } SIPX_VIDEO_DISPLAY_TYPE;
00534 
00538 struct SIPX_VIDEO_DISPLAY
00539 {
00541     SIPX_VIDEO_DISPLAY()
00542     {
00543         cbSize = sizeof(SIPX_VIDEO_DISPLAY);
00544         type = SIPX_WINDOW_HANDLE_TYPE;
00545         handle = NULL;
00546     }
00548     ~SIPX_VIDEO_DISPLAY()
00549     {
00550         if (type == DIRECT_SHOW_FILTER)
00551         {
00552 #ifdef DIRECT_SHOW_RENDER
00553             if (handle) ((IUnknown*)handle)->Release();
00554 #endif              
00555         }
00556     }
00558     SIPX_VIDEO_DISPLAY(const SIPX_VIDEO_DISPLAY& ref)
00559     {
00560         copy(ref);
00561     }
00563     SIPX_VIDEO_DISPLAY& operator=(const SIPX_VIDEO_DISPLAY& ref)
00564     {
00565         // check for assignment to self
00566         if (this == &ref) return *this;
00567         copy(ref);
00568         return *this;
00569     }    
00570     int cbSize;                     
00571     SIPX_VIDEO_DISPLAY_TYPE type;   
00572     union
00573     {
00574         SIPX_WINDOW_HANDLE handle;  
00575 #ifdef DIRECT_SHOW_RENDER
00576         IBaseFilter* filter;        
00577 #endif
00578     };
00579 private:
00580     void copy(const SIPX_VIDEO_DISPLAY& ref)
00581     {
00582         cbSize = ref.cbSize;
00583         type = ref.type;
00584         handle = ref.handle;
00585         if (type == DIRECT_SHOW_FILTER)
00586         {
00587 #ifdef DIRECT_SHOW_RENDER
00588             // we should addRef here.
00589             if (handle) ((IBaseFilter*)handle)->AddRef();
00590 #endif            
00591         }
00592     }
00593     
00594 };
00595 
00600 typedef int SIPX_CONTACT_ID; 
00601 
00608 struct SIPX_CONTACT_ADDRESS
00609 {
00611     SIPX_CONTACT_ADDRESS()
00612     {
00613         cbSize = sizeof(SIPX_CONTACT_ADDRESS);
00614         memset((void*)cInterface, 0, sizeof(cInterface));
00615         memset((void*)cIpAddress, 0, sizeof(cIpAddress));
00616         memset((void*)cCustomTransportName, 0, sizeof(cCustomTransportName));
00617         memset((void*)cCustomRouteID, 0, sizeof(cCustomRouteID));
00618         eContactType = CONTACT_AUTO;
00619         eTransportType = TRANSPORT_UDP ;
00620         id = 0;
00621         iPort = -1;
00622     }
00624     SIPX_CONTACT_ADDRESS(const SIPX_CONTACT_ADDRESS& ref)
00625     {
00626         cbSize = sizeof(SIPX_CONTACT_ADDRESS);
00627         strncpy(cInterface, ref.cInterface, sizeof(cInterface));
00628         strncpy(cIpAddress, ref.cIpAddress, sizeof(cIpAddress));
00629         eContactType = ref.eContactType;
00630         eTransportType = ref.eTransportType;
00631         id = ref.id;
00632         iPort = ref.iPort;
00633         if (ref.cbSize == sizeof(SIPX_CONTACT_ADDRESS))
00634         {
00635         strncpy(cCustomTransportName, ref.cCustomTransportName, 32);
00636         strncpy(cCustomRouteID, ref.cCustomRouteID, sizeof(cCustomRouteID));
00637     }
00638         else
00639         {
00640             memset((void*)cCustomTransportName, 0, sizeof(cCustomTransportName));
00641             memset((void*)cCustomRouteID, 0, sizeof(cCustomRouteID));
00642         }
00643     }
00644 
00646     SIPX_CONTACT_ADDRESS& operator=(const SIPX_CONTACT_ADDRESS& ref)
00647     {
00648         // check for assignment to self
00649         if (this == &ref) return *this;
00650         strncpy(cInterface, ref.cInterface, sizeof(cInterface));
00651         strncpy(cIpAddress, ref.cIpAddress, sizeof(cIpAddress));
00652         eContactType = ref.eContactType;
00653         eTransportType = ref.eTransportType;
00654         id = ref.id;
00655         iPort = ref.iPort;
00656         if (cbSize == sizeof(SIPX_CONTACT_ADDRESS))
00657         {
00658             strncpy(cCustomTransportName, ref.cCustomTransportName, sizeof(cCustomTransportName));
00659             strncpy(cCustomRouteID, ref.cCustomRouteID, sizeof(cCustomRouteID));
00660         }
00661         return *this;
00662     }    
00663     SIPX_CONTACT_ID     id;              
00664     SIPX_CONTACT_TYPE   eContactType ;   
00665     SIPX_TRANSPORT_TYPE eTransportType ; 
00666     char                cInterface[32] ; 
00667     char                cIpAddress[28] ; 
00668     int                 cbSize;      
00669     int                 iPort ;          
00670     char                cCustomTransportName[32]; 
00671     char                cCustomRouteID[64] ; 
00673 /*
00674     NOTE: I've carved a cbSize out of the cIpAddress to allow binary backwards 
00675           compatibilty with older version of the DLL.  If the cbSize isn't 
00676           want we expected, we should not touch data members.
00677 */
00678 };
00679 
00680 
00684 typedef struct 
00685 {
00686 #define SIPXTAPI_CODEC_NAMELEN 32       
00687     char              cName[SIPXTAPI_CODEC_NAMELEN];  
00688     SIPX_AUDIO_BANDWIDTH_ID iBandWidth; 
00689     int               iPayloadType;     
00690 } SIPX_AUDIO_CODEC ;
00691 
00692 
00696 typedef struct 
00697 {
00698     int cbSize;                     
00700     unsigned short fraction_lost;   
00701     unsigned long cum_lost;         
00702     unsigned long ext_max;          
00703     unsigned long jitter;           
00704     int RTT;                        
00705     int bytesSent;                  
00706     int packetsSent;                
00707     int bytesReceived;              
00708     int packetsReceived;            
00709 } SIPX_RTCP_STATS ;
00710 
00714 typedef struct 
00715 {
00716 #define SIPXTAPI_CODEC_NAMELEN 32        
00717     char              cName[SIPXTAPI_CODEC_NAMELEN];  
00718     SIPX_VIDEO_BANDWIDTH_ID iBandWidth;  
00719     int               iPayloadType;      
00720 } SIPX_VIDEO_CODEC ;
00721 
00722 
00728 typedef struct
00729 {
00730     SIPX_AUDIO_CODEC audioCodec;     
00731     SIPX_VIDEO_CODEC videoCodec;     
00732     bool bIsEncrypted;               
00733 } SIPX_CODEC_INFO;
00734 
00735 
00740  typedef enum SIPX_RTP_TRANSPORT
00741 {
00742    SIPX_RTP_TRANSPORT_UNKNOWN   = 0x00000000,
00743    SIPX_RTP_TRANSPORT_UDP       = 0x00000001,
00744    SIPX_RTP_TRANSPORT_TCP       = 0x00000002,
00745    SIPX_RTP_TCP_ROLE_ACTIVE     = 0x00000004,
00746    SIPX_RTP_TCP_ROLE_PASSIVE    = 0x00000008,
00747    SIPX_RTP_TCP_ROLE_ACTPASS    = 0x00000010,
00748    SIPX_RTP_TCP_ROLE_CONNECTION = 0x00000020,
00749 };
00750 
00755 typedef struct 
00756 {
00757     int cbSize;                          
00758     SIPX_AUDIO_BANDWIDTH_ID bandwidthId; 
00759     bool sendLocation;                   
00760     SIPX_CONTACT_ID contactId;           
00762     SIPX_RTP_TRANSPORT rtpTransportFlags; 
00764     /*
00765      * NOTE: When adding new data to this structure, please always add it to
00766      *       the end.  This will allow us to maintain some drop-in 
00767      *       backwards compatibility between releases.
00768      */
00769 } SIPX_CALL_OPTIONS;
00770 
00771 
00779 typedef void* SIPX_INST ;         
00780 const SIPX_INST SIPX_INST_NULL = 0; 
00788 typedef unsigned int SIPX_LINE ;
00789 const SIPX_LINE SIPX_LINE_NULL = 0; 
00796 typedef unsigned int SIPX_CALL ;
00797 const SIPX_CALL SIPX_CALL_NULL = 0; 
00804 typedef unsigned int SIPX_CONF ;
00805 const SIPX_CONF SIPX_CONF_NULL = 0; 
00817 typedef unsigned int SIPX_INFO;
00818 
00828 typedef unsigned int SIPX_PUB;
00829 
00830 const SIPX_PUB SIPX_PUB_NULL = 0; 
00840 typedef unsigned int SIPX_SUB ;
00841 
00842 
00847 typedef unsigned int SIPX_TRANSPORT ;
00848 const SIPX_TRANSPORT SIPX_TRANSPORT_NULL = 0; 
00865 typedef bool (SIPX_CALLING_CONVENTION *SIPX_TRANSPORT_WRITE_PROC)(
00866         SIPX_TRANSPORT hTransport,
00867         const char*    szDestinationIp,
00868         const int      iDestPort,
00869         const char*    szLocalIp,
00870         const int      iLocalPort,
00871         const void*    pData,
00872         const size_t   nData,
00873         const void*    pUserData) ;
00874 
00883 typedef void (*fnMicAudioHook)(const int nSamples, short* pSamples) ;
00884 
00893 typedef void (*fnSpkrAudioHook)(const int nSamples, short* pSamples) ;
00894 
00895 
00912 typedef enum
00913 {
00914     SIPX_KEEPALIVE_CRLF,        
00915     SIPX_KEEPALIVE_STUN,        
00916     SIPX_KEEPALIVE_SIP_PING,    
00917     SIPX_KEEPALIVE_SIP_OPTIONS, 
00918 } SIPX_KEEPALIVE_TYPE ;
00919 
00927 typedef enum SIPX_AEC_MODE
00928 {
00929     SIPX_AEC_DISABLED,   
00931     SIPX_AEC_SUPPRESS,   
00937     SIPX_AEC_CANCEL,     
00945     SIPX_AEC_CANCEL_AUTO,
00950 } SIPX_AEC_MODE ;
00951 
00952 
00963 typedef enum SIPX_NOISE_REDUCTION_MODE
00964 {
00965     SIPX_NOISE_REDUCTION_DISABLED,  
00967     SIPX_NOISE_REDUCTION_LOW,       
00969     SIPX_NOISE_REDUCTION_MEDIUM,    
00971     SIPX_NOISE_REDUCTION_HIGH,      
00973 } SIPX_NOISE_REDUCTION_MODE ;
00974 
00975 /* ============================ FUNCTIONS ================================= */
00976 
00979 
00980 
01026 SIPXTAPI_API SIPX_RESULT sipxInitialize(SIPX_INST* phInst,
01027                                         const int udpPort = DEFAULT_UDP_PORT,
01028                                         const int tcpPort = DEFAULT_TCP_PORT,
01029                                         const int tlsPort = DEFAULT_TLS_PORT,
01030                                         const int rtpPortStart = DEFAULT_RTP_START_PORT,
01031                                         const int maxConnections = DEFAULT_CONNECTIONS,
01032                                         const char* szIdentity = DEFAULT_IDENTITY,
01033                                         const char* szBindToAddr = DEFAULT_BIND_ADDRESS,
01034                                         bool      bUseSequentialPorts = false,
01035                                         const char* szTLSCertificateNickname = NULL,
01036                                         const char* szTLSCertificatePassword = NULL,
01037                                         const char* szDbLocation = NULL) ;
01038 
01039 
01090 SIPXTAPI_API SIPX_RESULT sipxReInitialize(SIPX_INST* phInst,
01091                                         const int udpPort = DEFAULT_UDP_PORT,
01092                                         const int tcpPort = DEFAULT_TCP_PORT,
01093                                         const int tlsPort = DEFAULT_TLS_PORT,
01094                                         const int rtpPortStart = DEFAULT_RTP_START_PORT,
01095                                         const int maxConnections = DEFAULT_CONNECTIONS,
01096                                         const char* szIdentity = DEFAULT_IDENTITY,
01097                                         const char* szBindToAddr = DEFAULT_BIND_ADDRESS,
01098                                         bool      bUseSequentialPorts = false,
01099                                         const char* szTLSCertificateNickname = NULL,
01100                                         const char* szTLSCertificatePassword = NULL,
01101                                         const char* szDbLocation = NULL) ;
01102 
01117 SIPXTAPI_API SIPX_RESULT sipxUnInitialize(SIPX_INST hInst, bool bForceShutdown = false);
01118 
01120 
01122 
01141 SIPXTAPI_API SIPX_RESULT sipxCallAccept(const SIPX_CALL hCall, 
01142                                         SIPX_VIDEO_DISPLAY* const pDisplay = NULL,
01143                                         SIPX_SECURITY_ATTRIBUTES* const pSecurity = NULL,
01144                                         SIPX_CALL_OPTIONS* options = NULL);
01145 
01146 
01159 SIPXTAPI_API SIPX_RESULT sipxCallReject(const SIPX_CALL hCall,
01160                                         const int errorCode = 400,
01161                                         const char* szErrorText = "Bad Request") ;
01162 
01163 
01175 SIPXTAPI_API SIPX_RESULT sipxCallRedirect(const SIPX_CALL hCall,
01176                                           const char* szForwardURL) ;
01177 
01189 SIPXTAPI_API SIPX_RESULT sipxCallAnswer(const SIPX_CALL hCall, 
01190                                         bool  bTakeFocus = true) ;
01191 
01192 
01206 SIPXTAPI_API SIPX_RESULT sipxCallCreate(const SIPX_INST hInst, 
01207                                         const SIPX_LINE hLine,
01208                                         SIPX_CALL*  phCall) ;
01209 
01247 SIPXTAPI_API SIPX_RESULT sipxCallConnect(const SIPX_CALL hCall,
01248                                          const char* szAddress,
01249                                          SIPX_CONTACT_ID contactId = 0,
01250                                          SIPX_VIDEO_DISPLAY* const pDisplay = NULL,
01251                                          SIPX_SECURITY_ATTRIBUTES* const pSecurity = NULL,
01252                                          bool bTakeFocus = true,
01253                                          SIPX_CALL_OPTIONS* options = NULL,
01254                                          const char* szCallId = NULL);
01255 
01309 SIPXTAPI_API SIPX_RESULT sipxCallHold(const SIPX_CALL hCall, 
01310                                       bool bStopRemoteAudio = true) ;
01311 
01312 
01324 SIPXTAPI_API SIPX_RESULT sipxCallUnhold(const SIPX_CALL hCall) ;
01325 
01326 
01334 SIPXTAPI_API SIPX_RESULT sipxCallDestroy(SIPX_CALL& hCall) ;
01335 
01336 
01347 SIPXTAPI_API SIPX_RESULT sipxCallGetID(const SIPX_CALL hCall,
01348                                        char* szId, 
01349                                        const size_t iMaxLength) ;
01350 
01363 SIPXTAPI_API SIPX_RESULT sipxCallGetLocalID(const SIPX_CALL hCall, 
01364                                             char* szId, 
01365                                             const size_t iMaxLength) ;
01366 
01367 
01378 SIPXTAPI_API SIPX_RESULT sipxCallGetRemoteID(const SIPX_CALL hCall, 
01379                                              char* szId, 
01380                                              const size_t iMaxLength) ;
01381 
01393 SIPXTAPI_API SIPX_RESULT sipxCallGetContactID(const SIPX_CALL hCall, 
01394                                               char* szId, 
01395                                               const size_t iMaxLength) ;
01396 
01405 SIPXTAPI_API SIPX_RESULT sipxCallGetConnectionId(const SIPX_CALL hCall,
01406                                                  int& connectionId);
01407 
01408 
01419 SIPXTAPI_API SIPX_RESULT sipxCallGetConference(const SIPX_CALL hCall,
01420                                                SIPX_CONF&      hConf) ;
01421                                                  
01422 
01433 SIPXTAPI_API SIPX_RESULT sipxCallGetRequestURI(const SIPX_CALL hCall, 
01434                                                char* szUri, 
01435                                                const size_t iMaxLength) ;
01436 
01437 
01438                                                            
01449 SIPXTAPI_API SIPX_RESULT sipxCallGetRemoteContact(const SIPX_CALL hCall, 
01450                                                   char* szContact, 
01451                                                   const size_t iMaxLength) ;
01452 
01453                                                            
01464 SIPXTAPI_API SIPX_RESULT sipxCallGetRemoteUserAgent(const SIPX_CALL hCall,
01465                                                     char* szAgent, 
01466                                                     const size_t iMaxLength) ;
01467 
01468 
01484 SIPXTAPI_API SIPX_RESULT sipxCallStartTone(const SIPX_CALL hCall, 
01485                                            const SIPX_TONE_ID toneId,
01486                                            const bool bLocal,
01487                                            const bool bRemote) ;
01488 
01503 SIPXTAPI_API SIPX_RESULT sipxCallStopTone(const SIPX_CALL hCall) ;
01504 
01505 
01531 SIPXTAPI_API SIPX_RESULT sipxCallAudioPlayFileStart(const SIPX_CALL hCall, 
01532                                                     const char* szFile,
01533                                                     const bool bRepeat,
01534                                                     const bool bLocal,
01535                                                     const bool bRemote,
01536                                                     const bool bMixWithMicrophone = false,
01537                                                     const float fVolumeScaling = 1.0) ;
01538 
01551 SIPXTAPI_API SIPX_RESULT sipxCallAudioPlayFileStop(const SIPX_CALL hCall) ; 
01552 
01553 
01568 SIPXTAPI_API SIPX_RESULT sipxCallAudioRecordFileStart(const SIPX_CALL hCall,
01569                                                       const char* szFile) ;
01570 
01579 SIPXTAPI_API SIPX_RESULT sipxCallAudioRecordFileStop(const SIPX_CALL hCall) ;
01580 
01581 
01604 SIPXTAPI_API SIPX_RESULT sipxCallPlayBufferStart(const SIPX_CALL hCall,
01605                                                  const char* szBuffer,
01606                                                  const int  bufSize,
01607                                                  const int  bufType,
01608                                                  const bool bRepeat,
01609                                                  const bool bLocal,
01610                                                  const bool bRemote) ;
01611 
01612 
01625 SIPXTAPI_API SIPX_RESULT sipxCallPlayBufferStop(const SIPX_CALL hCall) ; 
01626 
01627 
01657 SIPXTAPI_API SIPX_RESULT sipxCallSubscribe(const SIPX_CALL hCall,
01658                                            const char* szEventType,
01659                                            const char* szAcceptType,
01660                                            SIPX_SUB* phSub,
01661                                            bool bRemoteContactIsGruu = false);
01662 
01671 SIPXTAPI_API SIPX_RESULT sipxCallUnsubscribe(const SIPX_SUB hSub) ;
01672 
01673 
01690 SIPXTAPI_API SIPX_RESULT sipxCallSendInfo(SIPX_INFO* phInfo,
01691                                           const SIPX_CALL hCall,
01692                                           const char* szContentType,
01693                                           const char* szContent,
01694                                           const size_t nContentLength);
01695 
01782 SIPXTAPI_API SIPX_RESULT sipxCallBlindTransfer(const SIPX_CALL hCall, 
01783                                                const char* szAddress) ;
01784 
01884 SIPXTAPI_API SIPX_RESULT sipxCallTransfer(const SIPX_CALL hSourceCall,
01885                                           const SIPX_CALL hTargetCall) ;
01886 
01887 
01888 
01898 SIPXTAPI_API SIPX_RESULT sipxCallUpdateVideoWindow(const SIPX_CALL hCall, const SIPX_WINDOW_HANDLE hWnd);
01899 
01900 
01909 SIPXTAPI_API SIPX_RESULT sipxCallResizeWindow(const SIPX_CALL hCall, const SIPX_WINDOW_HANDLE hWnd);
01910 
01911 
01939 SIPXTAPI_API SIPX_RESULT sipxCallGetEnergyLevels(const SIPX_CALL hCall,
01940                                                  int&            iInputEnergyLevel,
01941                                                  int&            iOutputEnergyLevel,
01942                                                  const size_t    nMaxContributors,
01943                                                  unsigned int    CCSRCs[],
01944                                                  int             iEnergyLevels[],
01945                                                  size_t&         nActualContributors) ;
01946 
01961 SIPXTAPI_API SIPX_RESULT sipxCallGetAudioRtpSourceIds(const SIPX_CALL hCall,
01962                                                       unsigned int& iSendSSRC,
01963                                                       unsigned int& iReceiveSSRC)  ;
01964 
01979 SIPXTAPI_API SIPX_RESULT sipxCallGetAudioRtcpStats(const SIPX_CALL hCall,
01980                                                    SIPX_RTCP_STATS* pStats) ;
01981 
02005 SIPXTAPI_API SIPX_RESULT sipxCallLimitCodecPreferences(const SIPX_CALL hCall,
02006                                                        const SIPX_AUDIO_BANDWIDTH_ID audioBandwidth,
02007                                                        const SIPX_VIDEO_BANDWIDTH_ID videoBandwidth,
02008                                                        const char* szVideoCodecName);
02009 
02011 
02014 
02015 
02040 SIPXTAPI_API SIPX_RESULT sipxPublisherCreate(const SIPX_INST hInst, 
02041                                              SIPX_PUB* phPub,
02042                                              const char* szResourceId,
02043                                              const char* szEventType,
02044                                              const char* szContentType,
02045                                              const char* pContent,
02046                                              const size_t nContentLength);
02047 
02061 SIPXTAPI_API SIPX_RESULT sipxPublisherDestroy(const SIPX_PUB hPub,
02062                                               const char* szContentType,
02063                                               const char* pFinalContent,
02064                                               const size_t nContentLength);
02065 
02076 SIPXTAPI_API SIPX_RESULT sipxPublisherUpdate(const SIPX_PUB hPub,
02077                                              const char* szContentType,
02078                                              const char* pContent,
02079                                              const size_t nContentLength);
02080 
02082 
02085 
02086 
02097 SIPXTAPI_API SIPX_RESULT sipxConferenceCreate(const SIPX_INST hInst,
02098                                               SIPX_CONF* phConference) ;
02099 
02115 SIPXTAPI_API SIPX_RESULT sipxConferenceJoin(const SIPX_CONF hConf,
02116                                             const SIPX_CALL hCall) ;
02117 
02134 SIPXTAPI_API SIPX_RESULT sipxConferenceSplit(const SIPX_CONF hConf,
02135                                              const SIPX_CALL hCall) ;
02136 
02171 SIPXTAPI_API SIPX_RESULT sipxConferenceAdd(const SIPX_CONF hConf,
02172                                            const SIPX_LINE hLine,
02173                                            const char* szAddress,
02174                                            SIPX_CALL* phNewCall,
02175                                            SIPX_CONTACT_ID contactId = 0,
02176                                            SIPX_VIDEO_DISPLAY* const pDisplay = NULL,
02177                                            SIPX_SECURITY_ATTRIBUTES* const pSecurity = NULL,
02178                                            bool bTakeFocus = true,
02179                                            SIPX_CALL_OPTIONS* options = NULL);
02180 
02189 SIPXTAPI_API SIPX_RESULT sipxConferenceRemove(const SIPX_CONF hConf,
02190                                               const SIPX_CALL hCall) ;
02191 
02192 
02202 SIPXTAPI_API SIPX_RESULT sipxConferenceGetCalls(const SIPX_CONF hConf,
02203                                                 SIPX_CALL calls[], 
02204                                                 const size_t iMax, 
02205                                                 size_t& nActual) ;
02206 
02227 SIPXTAPI_API SIPX_RESULT sipxConferenceHold(const SIPX_CONF hConf,
02228                                             bool bBridging = true);
02229                                             
02242 SIPXTAPI_API SIPX_RESULT sipxConferenceUnhold(const SIPX_CONF hConf);
02243 
02244 
02270 SIPXTAPI_API SIPX_RESULT sipxConferencePlayAudioFileStart(const SIPX_CONF hConf, 
02271                                                           const char* szFile,
02272                                                           const bool bRepeat,
02273                                                           const bool bLocal,
02274                                                           const bool bRemote,
02275                                                           const bool bMixWithMicrophone = false,
02276                                                           const float fVolumeScaling = 1.0) ;
02277 
02278 /*
02279  * Stop playing a file started with sipxConferencePlayAudioFileStart
02280  * If a sipxConferenceDestroy is attempted while an audio file is playing,
02281  * sipxConferenceDestroy will fail with a SIPX_RESULT_BUSY return code.
02282  * Call sipxConferencePlayAudioFileStop before making the call to
02283  * sipxConferenceDestroy.
02284  * 
02285  * @param hConf Conference handle obtained by calling sipxConferenceCreate.
02286  */
02287 SIPXTAPI_API SIPX_RESULT sipxConferencePlayAudioFileStop(const SIPX_CONF hConf) ;
02288 
02289 
02297 SIPXTAPI_API SIPX_RESULT sipxConferenceDestroy(SIPX_CONF hConf) ;
02298 
02299 
02315 SIPXTAPI_API SIPX_RESULT sipxConferenceGetEnergyLevels(const SIPX_CONF hConf,
02316                                                        int&            iInputEnergyLevel,
02317                                                        int&            iOutputEnergyLevel) ;
02318 
02319 
02320 
02343 SIPXTAPI_API SIPX_RESULT sipxConferenceLimitCodecPreferences(const SIPX_CONF hConf,
02344                                                              const SIPX_AUDIO_BANDWIDTH_ID audioBandwidth,
02345                                                              const SIPX_VIDEO_BANDWIDTH_ID videoBandwidth,
02346                                                              const char* szVideoCodecName) ;
02348 
02351 
02360 SIPXTAPI_API SIPX_RESULT sipxAudioSetGain(const SIPX_INST hInst,
02361                                           const int iLevel) ;
02362 
02363 
02370 SIPXTAPI_API SIPX_RESULT sipxAudioGetGain(const SIPX_INST hInst,
02371                                           int& iLevel) ;
02372 
02373 
02381 SIPXTAPI_API SIPX_RESULT sipxAudioMute(const SIPX_INST hInst,
02382                                        const bool bMute) ;
02383 
02384 
02392 SIPXTAPI_API SIPX_RESULT sipxAudioIsMuted(const SIPX_INST hInst,
02393                                           bool &bMuted) ;
02394 
02395 
02404 SIPXTAPI_API SIPX_RESULT sipxAudioEnableSpeaker(const SIPX_INST hInst,
02405                                                 const SPEAKER_TYPE type) ;
02406 
02407 
02416 SIPXTAPI_API SIPX_RESULT sipxAudioGetEnabledSpeaker(const SIPX_INST hInst,
02417                                                     SPEAKER_TYPE& type) ;
02418 
02419 
02430 SIPXTAPI_API SIPX_RESULT sipxAudioSetVolume(const SIPX_INST hInst,
02431                                             const SPEAKER_TYPE type, 
02432                                             const int iLevel) ;
02433 
02434 
02444 SIPXTAPI_API SIPX_RESULT sipxAudioGetVolume(const SIPX_INST hInst,
02445                                             const SPEAKER_TYPE type, 
02446                                             int& iLevel) ;
02447 
02448 
02462 SIPXTAPI_API SIPX_RESULT sipxAudioSetAECMode(const SIPX_INST hInst,
02463                                              const SIPX_AEC_MODE mode) ;
02464 
02465 
02474 SIPXTAPI_API SIPX_RESULT sipxAudioGetAECMode(const SIPX_INST hInst,
02475                                              SIPX_AEC_MODE&  mode) ;
02476 
02477 
02486 SIPXTAPI_API SIPX_RESULT sipxAudioSetAGCMode(const SIPX_INST hInst,
02487                                              const bool bEnable) ;
02488 
02496 SIPXTAPI_API SIPX_RESULT sipxAudioGetAGCMode(const SIPX_INST hInst,
02497                                              bool& bEnabled) ;
02498 
02499 
02513 SIPXTAPI_API SIPX_RESULT sipxAudioSetNoiseReductionMode(const SIPX_INST hInst,
02514                                                         const SIPX_NOISE_REDUCTION_MODE mode) ;
02515 
02516 
02525 SIPXTAPI_API SIPX_RESULT sipxAudioGetNoiseReductionMode(const SIPX_INST hInst,
02526                                                         SIPX_NOISE_REDUCTION_MODE& mode) ;
02527  
02535 SIPXTAPI_API SIPX_RESULT sipxAudioGetNumInputDevices(const SIPX_INST hInst,
02536                                                      size_t& numDevices) ;
02537 
02546 SIPXTAPI_API SIPX_RESULT sipxAudioGetInputDevice(const SIPX_INST hInst,
02547                                                  const int index,
02548                                                  const char*& szDevice) ;
02549 
02556 SIPXTAPI_API SIPX_RESULT sipxAudioGetNumOutputDevices(const SIPX_INST hInst,
02557                                                       size_t& numDevices) ;
02558 
02567 SIPXTAPI_API SIPX_RESULT sipxAudioGetOutputDevice(const SIPX_INST hInst,
02568                                                   const int index,
02569                                                   const char*& szDevice) ;
02570 
02578 SIPXTAPI_API SIPX_RESULT sipxAudioSetCallInputDevice(const SIPX_INST hInst,
02579                                                      const char* szDevice) ;
02580 
02586 SIPXTAPI_API SIPX_RESULT sipxAudioSetRingerOutputDevice(const SIPX_INST hInst,
02587                                                         const char* szDevice) ;
02588 
02589 
02595 SIPXTAPI_API SIPX_RESULT sipxAudioSetCallOutputDevice(const SIPX_INST hInst,
02596                                                       const char* szDevice) ;
02597 
02598 
02600 
02602 
02603 
02628 SIPXTAPI_API SIPX_RESULT sipxLineAdd(const SIPX_INST hInst,
02629                                      const char* szLineURL,
02630                                      SIPX_LINE* phLine,
02631                                      SIPX_CONTACT_ID contactId = 0) ;
02632 
02651 SIPXTAPI_API SIPX_RESULT sipxLineAddAlias(const SIPX_LINE hLine, const char* szLineURL) ;
02652 
02668 SIPXTAPI_API SIPX_RESULT sipxLineRegister(const SIPX_LINE hLine, const bool bRegister);
02669 
02680 SIPXTAPI_API SIPX_RESULT sipxLineRemove(SIPX_LINE hLine) ;
02681 
02694 SIPXTAPI_API SIPX_RESULT sipxLineAddCredential(const SIPX_LINE hLine,                                                 
02695                                                const char* szUserID,
02696                                                const char* szPasswd,
02697                                                const char* szRealm) ;
02698 
02708 SIPXTAPI_API SIPX_RESULT sipxLineGet(const SIPX_INST hInst,
02709                                      SIPX_LINE lines[],
02710                                      const size_t max,
02711                                      size_t& actual) ;
02712 
02724 SIPXTAPI_API SIPX_RESULT sipxLineGetURI(const SIPX_LINE hLine,
02725                                         char*  szBuffer,
02726                                         const size_t nBuffer,
02727                                         size_t& nActual) ;
02728 
02737 SIPXTAPI_API SIPX_RESULT sipxLineGetContactId(const SIPX_LINE  hLine,
02738                                               SIPX_CONTACT_ID& contactId) ;
02739 
02740 
02748 SIPXTAPI_API SIPX_RESULT sipxLineFindByURI(const SIPX_INST hInst,
02749                                            const char* szURI,
02750                                            SIPX_LINE&  hLine) ;
02751 
02753 
02755 
02756 
02769 SIPXTAPI_API SIPX_RESULT sipxConfigSetLogLevel(SIPX_LOG_LEVEL logLevel) ;
02770 
02771 
02784 SIPXTAPI_API SIPX_RESULT sipxConfigSetLogFile(const char *szFilename) ;
02785 
02786 
02796 SIPXTAPI_API SIPX_RESULT sipxConfigSetLogCallback(sipxLogCallback pCallback);
02797 
02798 
02809 SIPXTAPI_API SIPX_RESULT sipxConfigEnableGIPSTracing(SIPX_INST hInst, 
02810                                                      bool bEnable) ;
02811 
02825 SIPXTAPI_API SIPX_RESULT sipxConfigSetMicAudioHook(fnMicAudioHook hookProc) ;
02826 
02827 
02840 SIPXTAPI_API SIPX_RESULT sipxConfigSetSpkrAudioHook(fnSpkrAudioHook hookProc) ;
02841 
02850 SIPXTAPI_API SIPX_RESULT sipxConfigSetUserAgentName(const SIPX_INST hInst, 
02851                                                     const char* szName, 
02852                                                     const bool bIncludePlatformName = true);
02853                                                     
02860 SIPXTAPI_API SIPX_RESULT sipxConfigSetOutboundProxy(const SIPX_INST hInst,
02861                                                     const char* szProxy) ;
02862 
02884 SIPXTAPI_API SIPX_RESULT sipxConfigSetDnsSrvTimeouts(const int initialTimeoutInSecs, 
02885                                                      const int retries) ;
02886 
02887 
02897 SIPXTAPI_API SIPX_RESULT sipxConfigSetRegisterResponseWaitSeconds(const SIPX_INST hInst,
02898                                                                   const int seconds);   
02909 SIPXTAPI_API SIPX_RESULT sipxConfigSetDnsSrvFailoverTimeout(const SIPX_INST hInst,
02910                                                             const int failoverTimeoutInSecs); 
02911 
02912 
02922 SIPXTAPI_API SIPX_RESULT sipxConfigEnableRport(const SIPX_INST hInst,
02923                                                const bool bEnable) ;
02924                                                
02934 SIPXTAPI_API SIPX_RESULT sipxConfigSetRegisterExpiration(const SIPX_INST hInst,
02935                                                          const int nRegisterExpirationSecs);
02936 
02946 SIPXTAPI_API SIPX_RESULT sipxConfigSetSubscribeExpiration(const SIPX_INST hInst,
02947                                                           const int nSubscribeExpirationSecs);
02948    
02970 SIPXTAPI_API SIPX_RESULT sipxConfigEnableStun(const SIPX_INST hInst,
02971                                               const char* szServer, 
02972                                               int iServerPort,
02973                                               int iKeepAliveInSecs) ;
02974 
02980 SIPXTAPI_API SIPX_RESULT sipxConfigDisableStun(const SIPX_INST hInst) ;
02981 
02982 
02998 SIPXTAPI_API SIPX_RESULT sipxConfigEnableTurn(const SIPX_INST hInst,
02999                                               const char*     szServer,
03000                                               const int       iServerPort,
03001                                               const char*     szUsername,
03002                                               const char*     szPassword,
03003                                               const int       iKeepAliveInSecs) ;
03004 
03010 SIPXTAPI_API SIPX_RESULT sipxConfigDisableTurn(const SIPX_INST hInst) ;
03011 
03012 
03021 SIPXTAPI_API SIPX_RESULT sipxConfigEnableIce(const SIPX_INST hInst) ;
03022 
03023 
03029 SIPXTAPI_API SIPX_RESULT sipxConfigDisableIce(const SIPX_INST hInst) ;
03030 
03031 
03050 SIPXTAPI_API SIPX_RESULT sipxConfigKeepAliveAdd(const SIPX_INST     hInst,
03051                                                 SIPX_CONTACT_ID     contactId,
03052                                                 SIPX_KEEPALIVE_TYPE type,
03053                                                 const char*         remoteIp,
03054                                                 int                 remotePort,
03055                                                 int                 keepAliveSecs) ;
03056 
03057 
03074 SIPXTAPI_API SIPX_RESULT sipxConfigKeepAliveRemove(const SIPX_INST     hInst,
03075                                                    SIPX_CONTACT_ID     contactId,
03076                                                    SIPX_KEEPALIVE_TYPE type,
03077                                                    const char*         remoteIp,
03078                                                    int                 remotePort) ;
03079 
03080 
03096 SIPXTAPI_API SIPX_RESULT sipxConfigEnableOutOfBandDTMF(const SIPX_INST hInst,
03097                                                        const bool bEnable) ;
03098 
03107 SIPXTAPI_API SIPX_RESULT sipxConfigEnableInBandDTMF(const SIPX_INST hInst,
03108                                                     const bool bEnable) ;
03109      
03110      
03118 SIPXTAPI_API SIPX_RESULT sipxConfigEnableRTCP(const SIPX_INST hInst,
03119                                               const bool bEnable) ;
03120      
03121 
03128 SIPXTAPI_API SIPX_RESULT sipxConfigEnableDnsSrv(const bool bEnable);
03129 
03136 SIPXTAPI_API SIPX_RESULT sipxConfigIsOutOfBandDTMFEnabled(const SIPX_INST hInst,
03137                                                           bool& bEnable) ;
03138 
03145 SIPXTAPI_API SIPX_RESULT sipxConfigIsInBandDTMFEnabled(const SIPX_INST hInst,
03146                                                        bool& bEnable) ;
03147 
03148 
03157 SIPXTAPI_API SIPX_RESULT sipxConfigGetVersion(char* szVersion,
03158                                               const size_t nBuffer) ;
03159 
03170 SIPXTAPI_API SIPX_RESULT sipxConfigGetLocalSipUdpPort(SIPX_INST hInst, int* pPort) ;
03171 
03172 
03183 SIPXTAPI_API SIPX_RESULT sipxConfigGetLocalSipTcpPort(SIPX_INST hInst, int* pPort) ;
03184 
03185 
03196 SIPXTAPI_API SIPX_RESULT sipxConfigGetLocalSipTlsPort(SIPX_INST hInst, int* pPort) ;
03197 
03198 
03210 SIPXTAPI_API SIPX_RESULT sipxConfigSetAudioCodecPreferences(const SIPX_INST hInst, 
03211                                                             SIPX_AUDIO_BANDWIDTH_ID bandWidth) ;
03212 
03223 SIPXTAPI_API SIPX_RESULT sipxConfigSetAudioCodecByName(const SIPX_INST hInst, 
03224                                                        const char* szCodecName) ;
03225 
03235 SIPXTAPI_API SIPX_RESULT sipxConfigGetAudioCodecPreferences(const SIPX_INST hInst, 
03236                                                             SIPX_AUDIO_BANDWIDTH_ID *pBandWidth);
03237 
03248 SIPXTAPI_API SIPX_RESULT sipxConfigGetNumAudioCodecs(const SIPX_INST hInst, 
03249                                                      int* pNumCodecs) ;
03250 
03251 
03266 SIPXTAPI_API SIPX_RESULT sipxConfigGetAudioCodec(const SIPX_INST hInst, 
03267                                                  const int index, 
03268                                                  SIPX_AUDIO_CODEC* pCodec) ;
03269 
03289 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoBandwidth(const SIPX_INST hInst, 
03290                                                      SIPX_VIDEO_BANDWIDTH_ID bandWidth);
03291 
03302 SIPXTAPI_API SIPX_RESULT sipxConfigGetVideoCaptureDevices(const SIPX_INST hInst,
03303                                                           char **arrSzCaptureDevices,
03304                                                           int nDeviceStringLength,
03305                                                           int nArrayLength);
03306                                                           
03307 
03317 SIPXTAPI_API SIPX_RESULT sipxConfigGetVideoCaptureDevice(const SIPX_INST hInst,
03318                                                          char* szCaptureDevice,
03319                                                          int nLength);
03320                                                           
03328 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoCaptureDevice(const SIPX_INST hInst,
03329                                                          const char* szCaptureDevice);
03330                                                           
03331                             
03342 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoCodecByName(const SIPX_INST hInst, 
03343                                                        const char* szCodecName) ;
03344 
03354 SIPXTAPI_API SIPX_RESULT sipxConfigResetVideoCodecs(const SIPX_INST hInst);
03355 
03365 SIPXTAPI_API SIPX_RESULT sipxConfigGetVideoCodecPreferences(const SIPX_INST hInst, 
03366                                                             SIPX_VIDEO_BANDWIDTH_ID *pBandWidth);
03367 
03378 SIPXTAPI_API SIPX_RESULT sipxConfigGetNumVideoCodecs(const SIPX_INST hInst, 
03379                                                      int* pNumCodecs) ;
03380 
03381 
03389 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoFormat(const SIPX_INST hInst,
03390                                                   SIPX_VIDEO_FORMAT videoFormat);
03391 
03392 
03407 SIPXTAPI_API SIPX_RESULT sipxConfigGetVideoCodec(const SIPX_INST hInst, 
03408                                                  const int index, 
03409                                                  SIPX_VIDEO_CODEC* pCodec) ;
03410 
03434 SIPXTAPI_API SIPX_RESULT sipxConfigGetLocalContacts(const SIPX_INST hInst,
03435                                                     SIPX_CONTACT_ADDRESS addresses[],
03436                                                     size_t nMaxAddresses,
03437                                                     size_t& nActualAddresses) ;
03438 
03462 SIPXTAPI_API SIPX_RESULT sipxConfigGetLocalFeedbackAddress(const SIPX_INST hInst,
03463                                                            const char*     szRemoteIp,
03464                                                            const int       iRemotePort,
03465                                                            char*           szContactIp,
03466                                                            size_t          nContactIpLength,
03467                                                            int&            iContactPort,
03468                                                            int             iTimeoutMs) ;
03469 
03483 SIPXTAPI_API SIPX_RESULT sipxConfigGetAllLocalNetworkIps(const char* arrAddresses[], 
03484                                                          const char* arrAddressAdapter[],
03485                                                          int &numAddresses);
03486                                                          
03496 SIPXTAPI_API SIPX_RESULT sipxConfigSetSecurityParameters(const SIPX_INST hInst,
03497                                                          const char* szDbLocation,
03498                                                          const char* szMyCertNickname,
03499                                                          const char* szDbPassword);                                        
03500 
03507 SIPXTAPI_API SIPX_RESULT sipxConfigEnableSipShortNames(const SIPX_INST hInst, 
03508                                                        const bool bEnabled);
03509 
03516 SIPXTAPI_API SIPX_RESULT sipxConfigEnableSipDateHeader(const SIPX_INST hInst, 
03517                                                        const bool bEnabled);
03524 SIPXTAPI_API SIPX_RESULT sipxConfigEnableSipAllowHeader(const SIPX_INST hInst, 
03525                                                        const bool bEnabled);
03532 SIPXTAPI_API SIPX_RESULT sipxConfigSetSipAcceptLanguage(const SIPX_INST hInst, 
03533                                                         const char* szLanguage);
03547 SIPXTAPI_API SIPX_RESULT sipxConfigSetLocationHeader(const SIPX_INST hInst, 
03548                                                      const char* szHeader);
03549 
03564 SIPXTAPI_API SIPX_RESULT sipxConfigSetConnectionIdleTimeout(const SIPX_INST hInst, 
03565                                                             const int idleTimeout);
03566 
03573 SIPXTAPI_API SIPX_RESULT sipxConfigPrepareToHibernate(const SIPX_INST hInst);
03574 
03575 
03581 SIPXTAPI_API SIPX_RESULT sipxConfigUnHibernate(const SIPX_INST hInst);
03582 
03583 
03591 SIPXTAPI_API SIPX_RESULT sipxConfigEnableRtpOverTcp(const SIPX_INST hInst,
03592                                                     bool bEnable);
03593 
03600 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoPreviewDisplay(const SIPX_INST hInst, 
03601                                                           SIPX_VIDEO_DISPLAY* const pDisplay);
03602 
03603 
03611 SIPXTAPI_API SIPX_RESULT sipxConfigUpdatePreviewWindow(const SIPX_INST hInst, const SIPX_WINDOW_HANDLE hWnd);
03612 
03613 
03620 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoQuality(const SIPX_INST hInst, const SIPX_VIDEO_QUALITY_ID quality);
03621 
03629 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoParameters(const SIPX_INST hInst, 
03630                                                       const int bitRate,
03631                                                       const int frameRate);
03632 
03639 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoBitrate(const SIPX_INST hInst, 
03640                                                    const int bitRate);
03641 
03648 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoFramerate(const SIPX_INST hInst, 
03649                                                      const int frameRate);
03650 
03657 SIPXTAPI_API SIPX_RESULT sipxConfigSetVideoCpuUsage(const SIPX_INST hInst, 
03658                                                     const int cpuUsage);
03659 
03660 
03695 SIPXTAPI_API SIPX_RESULT sipxConfigSubscribe(const SIPX_INST hInst, 
03696                                              const SIPX_LINE hLine, 
03697                                              const char* szTargetUrl, 
03698                                              const char* szEventType, 
03699                                              const char* szAcceptType, 
03700                                              const SIPX_CONTACT_ID contactId, 
03701                                              SIPX_SUB* phSub); 
03710 SIPXTAPI_API SIPX_RESULT sipxConfigUnsubscribe(const SIPX_SUB hSub); 
03711 
03712 
03737 SIPXTAPI_API SIPX_RESULT sipxConfigExternalTransportAdd(SIPX_INST const           hInst,
03738                                                         SIPX_TRANSPORT&           hTransport,
03739                                                         const bool                bIsReliable,
03740                                                         const char*               szTransport,
03741                                                         const char*               szLocalIP,
03742                                                         const int                 iLocalPort,
03743                                                         SIPX_TRANSPORT_WRITE_PROC writeProc,
03744                                                         const char*               szLocalRoutingId,
03745                                                         const void*               pUserData = NULL) ;
03746 
03754 SIPXTAPI_API SIPX_RESULT sipxConfigExternalTransportRemove(const SIPX_TRANSPORT hTransport);
03755 
03765 SIPXTAPI_API SIPX_RESULT sipxConfigExternalTransportRouteByUser(const SIPX_TRANSPORT hTransport,
03766                                                                 bool                 bRouteByUser) ;
03767 
03785 SIPXTAPI_API SIPX_RESULT sipxConfigExternalTransportHandleMessage(const SIPX_TRANSPORT hTransport,
03786                                                                   const char*  szSourceIP,
03787                                                                   const int    iSourcePort,
03788                                                                   const char*  szLocalIP,
03789                                                                   const int    iLocalPort,
03790                                                                   const void*  pData,
03791                                                                   const size_t nData);
03792 
03806 SIPXTAPI_API SIPX_RESULT sipxConfigSetVoiceQualityServer(const SIPX_INST hInst,
03807                                                          const char*     szServer) ;
03808 
03810 
03812 
03820 SIPXTAPI_API SIPX_RESULT sipxUtilUrlParse(const char* szUrl,
03821                                           char* szUsername,
03822                                           char* szHostname,
03823                                           int*  iPort) ;
03824 
03828 SIPXTAPI_API SIPX_RESULT sipxUtilUrlGetDisplayName(const char* szUrl,
03829                                                    char*       szDisplayName,
03830                                                    size_t      nDisplayName) ;
03831 
03840 SIPXTAPI_API SIPX_RESULT sipxUtilUrlUpdate(char*       szUrl,
03841                                            size_t &    nUrl,
03842                                            const char* szNewUsername,
03843                                            const char* szNewHostname,
03844                                            const int   iNewPort) ;
03845 
03846 
03858 SIPXTAPI_API SIPX_RESULT sipxUtilUrlGetUrlParam(const char* szUrl,
03859                                                 const char* szParamName,
03860                                                 size_t      nParamIndex,
03861                                                 char*       szParamValue,
03862                                                 size_t      nParamValue) ;
03864 
03865 
03866 #endif // _sipXtapi_h_

Generated on Wed Jan 31 22:16:37 2007 for sipXtapi by  doxygen 1.5.1-p1