PortSIP VoIP SDK Manual for Windows  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Functions
Initialize and register functions

Functions

Int32 PortSIP.PortSIPLib.initialize (TRANSPORT_TYPE transportType, String localIp, Int32 localSIPPort, PORTSIP_LOG_LEVEL logLevel, String logFilePath, Int32 maxCallSessions, String sipAgentString, Int32 audioDeviceLayer, Int32 videoDeviceLayer, String TLSCertificatesRootPath, String TLSCipherList, Boolean verifyTLSCertificate)
 Initialize the SDK. More...
 
void PortSIP.PortSIPLib.unInitialize ()
 Un-initialize the SDK and release resources.
 
Int32 PortSIP.PortSIPLib.getVersion (out Int32 majorVersion, out Int32 minorVersion)
 Get the current version number of the SDK. More...
 
Int32 PortSIP.PortSIPLib.setLicenseKey (String key)
 Set the license key. It must be called before setUser function. More...
 

Detailed Description

Initialize and register functions

Function Documentation

◆ initialize()

Int32 PortSIP.PortSIPLib.initialize ( TRANSPORT_TYPE  transportType,
String  localIp,
Int32  localSIPPort,
PORTSIP_LOG_LEVEL  logLevel,
String  logFilePath,
Int32  maxCallSessions,
String  sipAgentString,
Int32  audioDeviceLayer,
Int32  videoDeviceLayer,
String  TLSCertificatesRootPath,
String  TLSCipherList,
Boolean  verifyTLSCertificate 
)

Initialize the SDK.

Parameters
transportTransport for SIP signaling. TRANSPORT_PERS is the PortSIP private transport for anti SIP blocking. It must be used with PERS.
localIPThe local computer IP address to be bound (for example: 192.168.1.108). It will be used for sending and receiving SIP messages and RTP packets. If this IP is passed in IPv6 format, the SDK will be using IPv6.
If you want the SDK to choose correct network interface (IP) automatically, please pass the "0.0.0.0"(for IPv4) or "::" (for IPv6).
localSIPPortThe SIP message transport listener port, for example: 5060.
logLevelSet the application log level. The SDK will generate "PortSIP_Log_datatime.log" file if the log enabled.
logFilePathThe log file path. The path (folder) MUST be existent.
maxCallLinesTheoretically, unlimited lines could be supported depending on the device capability. For SIP client recommended value ranges 1 - 100;
sipAgentThe User-Agent header to be inserted into SIP messages.
audioDeviceLayerSpecify the audio device layer to be used:
0 = Use the OS default device.
1 = Virtual device, usually use this for the device which has no sound device installed.
videoDeviceLayerSpecifies the video device layer that should be used:
0 = Use the OS default device.
1 = Use Virtual device. Usually use this for the device which has no camera installed.
TLSCertificatesRootPathSpecify the TLS certificate path, from which the SDK will load the certificates automatically. Note: On Windows, this path will be ignored, and SDK will read the certificates from Windows certificates stored area instead.
TLSCipherListSpecify the TLS cipher list. This parameter is usually passed as empty so that the SDK will offer all available ciphers.
verifyTLSCertificateIndicate if SDK will verify the TLS certificate. By setting to false, the SDK will not verify the validity of TLS certificate.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code

◆ getVersion()

Int32 PortSIP.PortSIPLib.getVersion ( out Int32  majorVersion,
out Int32  minorVersion 
)

Get the current version number of the SDK.

Parameters
majorVersionReturn the major version number.
minorVersionReturn the minor version number.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setLicenseKey()

Int32 PortSIP.PortSIPLib.setLicenseKey ( String  key)

Set the license key. It must be called before setUser function.

Parameters
keyThe SDK license key, please purchase from PortSIP.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.