![]() |
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 | |
Int32 | PortSIP.PortSIPLib.getNICNums () |
Get the Network Interface Card numbers. More... | |
Int32 | PortSIP.PortSIPLib.getLocalIpAddress (Int32 index, StringBuilder ip, Int32 ipSize) |
Get the local IP address by Network Interface Card index. More... | |
Int32 | PortSIP.PortSIPLib.setUser (String userName, String displayName, String authName, String password, String sipDomain, String sipServerAddr, Int32 sipServerPort, String stunServerAddr, Int32 stunServerPort, String outboundServerAddr, Int32 outboundServerPort) |
Set user account info. More... | |
void | PortSIP.PortSIPLib.removeUser () |
Remove the user. It will un-register from SIP server given that the user is already registered. | |
Int32 | PortSIP.PortSIPLib.setInstanceId (String uuid) |
Set outbound (RFC5626) instanceId to be used in contact headers. More... | |
Int32 | PortSIP.PortSIPLib.registerServer (Int32 expires, Int32 retryTimes) |
Register to SIP proxy server (login to server). More... | |
Int32 | PortSIP.PortSIPLib.unRegisterServer () |
Un-register from the SIP proxy server. More... | |
Int32 | PortSIP.PortSIPLib.enableRport (Boolean enable) |
Enable/disable rport(RFC3581). More... | |
Int32 | PortSIP.PortSIPLib.enableEarlyMedia (Boolean enable) |
Enable/disable Early Media. More... | |
Int32 | PortSIP.PortSIPLib.enableReliableProvisional (Boolean enable) |
Enable/disable PRACK. More... | |
Int32 | PortSIP.PortSIPLib.enable3GppTags (Boolean enable) |
Enable/disable the 3Gpp tags, including "ims.icsi.mmtel" and "g.3gpp.smsip". More... | |
void | PortSIP.PortSIPLib.enableCallbackSendingSignaling (Boolean enable) |
Enable/disable callback the sent SIP messages. More... | |
void | PortSIP.PortSIPLib.enableCallbackReceivedSignaling (Boolean enable) |
Enable/disable callback the received SIP messages. More... | |
Int32 | PortSIP.PortSIPLib.setRtpCallback (Int32 callbackObject, Boolean enable) |
Set the RTP callbacks to allow access to the sent and received RTP packets. More... | |
Int32 PortSIP.PortSIPLib.getNICNums | ( | ) |
Get the Network Interface Card numbers.
Int32 PortSIP.PortSIPLib.getLocalIpAddress | ( | Int32 | index, |
StringBuilder | ip, | ||
Int32 | ipSize | ||
) |
Get the local IP address by Network Interface Card index.
index | The IP address index. For example, if the PC has two NICs, and we wish to obtain the second NIC IP. Set this parameter to 1 and the first NIC IP index is 0. |
ip | The buffer that is used to receive the IP. |
ipSize | The IP buffer size, which cannot be less than 32 bytes. |
Int32 PortSIP.PortSIPLib.setUser | ( | String | userName, |
String | displayName, | ||
String | authName, | ||
String | password, | ||
String | sipDomain, | ||
String | sipServerAddr, | ||
Int32 | sipServerPort, | ||
String | stunServerAddr, | ||
Int32 | stunServerPort, | ||
String | outboundServerAddr, | ||
Int32 | outboundServerPort | ||
) |
Set user account info.
userName | Account (User name) of the SIP. Usually provided by an IP-Telephony service provider. |
displayName | The display name of user. You can set it as your like, such as "James Kend". It's optional. |
authName | Authorization user name (usually equal to the username). |
password | The password of user. It's optional. |
localIp | The local computer IP address to be bound. For example: 192.168.1.108. It will be used for sending and receiving SIP message and RTP packet. If pass this IP as the IPv6 format, the SDK will use IPv6. |
localSipPort | The SIP message transport listener port. For example: 5060. |
userDomain | User domain; this parameter is optional that allows to pass an empty string if you are not using the domain. |
sipServer | SIP proxy server IP or domain. For example: xx.xxx.xx.x or sip.xxx.com. |
sipServerPort | Port of the SIP proxy server. For example: 5060. |
stunServer | Stun server used for NAT traversal. It's optional and can pass empty string to disable STUN. |
stunServerPort | STUN server port. It will be ignored if the outboundServer is empty. |
outboundServer | Outbound proxy server. For example: sip.domain.com. It's optional and allows to pass a empty string if not using outbound server. |
outboundServerPort | Outbound proxy server port, it will be ignored if the outboundServer is empty. |
Int32 PortSIP.PortSIPLib.setInstanceId | ( | String | uuid | ) |
Set outbound (RFC5626) instanceId to be used in contact headers.
uuid | The ID that will appear in the contact header. Please make sure it's a unique ID. |
Int32 PortSIP.PortSIPLib.registerServer | ( | Int32 | expires, |
Int32 | retryTimes | ||
) |
Register to SIP proxy server (login to server).
expires | Registration refresh Interval in seconds with maximum 3600. It will be inserted into SIP REGISTER message headers. |
retryTimes | The retry times if failed to refresh the registration. If it's set to be less than or equal to 0, the retry will be disabled and onRegisterFailure callback triggered when retry failed. |
Int32 PortSIP.PortSIPLib.unRegisterServer | ( | ) |
Un-register from the SIP proxy server.
Int32 PortSIP.PortSIPLib.enableRport | ( | Boolean | enable | ) |
Enable/disable rport(RFC3581).
enable | Set to true to enable the SDK to support rport. By default it is enabled. |
Int32 PortSIP.PortSIPLib.enableEarlyMedia | ( | Boolean | enable | ) |
Enable/disable Early Media.
enable | Set to true to enable the SDK to support Early Media. By default Early Media is disabled. |
Int32 PortSIP.PortSIPLib.enableReliableProvisional | ( | Boolean | enable | ) |
Enable/disable PRACK.
enable | Set to true to enable the SDK to support PRACK. The PRACK is disabled by default. |
Int32 PortSIP.PortSIPLib.enable3GppTags | ( | Boolean | enable | ) |
Enable/disable the 3Gpp tags, including "ims.icsi.mmtel" and "g.3gpp.smsip".
enable | Set to true to enable SDK to support 3Gpp tags. |
void PortSIP.PortSIPLib.enableCallbackSendingSignaling | ( | Boolean | enable | ) |
Enable/disable callback the sent SIP messages.
enable | Set as true to enable callback the sent SIP messages, or false to disable. Once enabled, the "onSendingSignaling" event will be triggered when the SDK sends a SIP message. |
void PortSIP.PortSIPLib.enableCallbackReceivedSignaling | ( | Boolean | enable | ) |
Enable/disable callback the received SIP messages.
enable | Set as true to enable callback the received SIP messages, or false to disable. Once enabled, the "onReceivedSignaling" event will be triggered when the SDK receives a SIP message. |
Int32 PortSIP.PortSIPLib.setRtpCallback | ( | Int32 | callbackObject, |
Boolean | enable | ||
) |
Set the RTP callbacks to allow access to the sent and received RTP packets.
callbackObject | The callback object that you passed in can be accessed once the callback function triggered. |
enable | Set to true to enable the RTP callback for received and sent RTP packets. The onSendingRtpPacket and onReceivedRtpPacket events will be triggered. |