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.setSrtpPolicy (SRTP_POLICY srtpPolicy, Boolean allowSrtpOverUnsecureTransport) |
Set the SRTP policy. More... | |
Int32 | PortSIP.PortSIPLib.setRtpPortRange (Int32 minimumRtpAudioPort, Int32 maximumRtpAudioPort, Int32 minimumRtpVideoPort, Int32 maximumRtpVideoPort) |
Set the RTP ports range for audio and video streaming. More... | |
Int32 | PortSIP.PortSIPLib.setRtcpPortRange (Int32 minimumRtcpAudioPort, Int32 maximumRtcpAudioPort, Int32 minimumRtcpVideoPort, Int32 maximumRtcpVideoPort) |
Set the RTCP ports range for audio and video streaming. More... | |
Int32 | PortSIP.PortSIPLib.enableCallForward (Boolean forBusyOnly, String forwardTo) |
Enable call forward. More... | |
Int32 | PortSIP.PortSIPLib.disableCallForward () |
Disable the call forwarding. The SDK is not forwarding any incoming call after this function is called. More... | |
Int32 | PortSIP.PortSIPLib.enableSessionTimer (Int32 timerSeconds, SESSION_REFRESH_MODE refreshMode) |
Allows to periodically refresh Session Initiation Protocol (SIP) sessions by sending INVITE requests repeatedly. More... | |
Int32 | PortSIP.PortSIPLib.disableSessionTimer () |
Disable the session timer. More... | |
void | PortSIP.PortSIPLib.setDoNotDisturb (Boolean state) |
Enable the "Do not disturb" to enable/disable. More... | |
Int32 | PortSIP.PortSIPLib.enableAutoCheckMwi (Boolean state) |
Allows to enable/disable the check MWI (Message Waiting Indication) automatically. More... | |
Int32 | PortSIP.PortSIPLib.setRtpKeepAlive (Boolean state, Int32 keepAlivePayloadType, Int32 deltaTransmitTimeMS) |
Enable or disable to send RTP keep-alive packet when the call is established. More... | |
Int32 | PortSIP.PortSIPLib.setKeepAliveTime (Int32 keepAliveTime) |
Enable or disable to send SIP keep-alive packet. More... | |
Int32 | PortSIP.PortSIPLib.getSipMessageHeaderValue (String sipMessage, String headerName, StringBuilder headerValue, Int32 headerValueLength) |
Access the SIP header of SIP message. More... | |
Int32 | PortSIP.PortSIPLib.addSipMessageHeader (Int32 sessionId, String methodName, Int32 msgType, String headerName, String headerValue) |
Add the SIP Message header into the specified outgoing SIP message. More... | |
Int32 | PortSIP.PortSIPLib.removeAddedSipMessageHeader (Int32 sipMessageHeaderId) |
Remove the headers (custom header) added by addSipMessageHeader. More... | |
Int32 | PortSIP.PortSIPLib.clearAddedSipMessageHeaders () |
Clear the added extension headers (custom headers) More... | |
Int32 | PortSIP.PortSIPLib.modifySipMessageHeader (Int32 sessionId, String methodName, Int32 msgType, String headerName, String headerValue) |
Modify the special SIP header value for every outgoing SIP message. More... | |
Int32 | PortSIP.PortSIPLib.removeModifiedSipMessageHeader (Int32 sipMessageHeaderId) |
Remove the extension header (custom header) from every outgoing SIP message. More... | |
Int32 | PortSIP.PortSIPLib.clearModifiedSipMessageHeaders () |
Clear the modified headers value, and do not modify every outgoing SIP message header values any longer. More... | |
Int32 PortSIP.PortSIPLib.setSrtpPolicy | ( | SRTP_POLICY | srtpPolicy, |
Boolean | allowSrtpOverUnsecureTransport | ||
) |
Set the SRTP policy.
srtpPolicy | The SRTP policy. |
Int32 PortSIP.PortSIPLib.setRtpPortRange | ( | Int32 | minimumRtpAudioPort, |
Int32 | maximumRtpAudioPort, | ||
Int32 | minimumRtpVideoPort, | ||
Int32 | maximumRtpVideoPort | ||
) |
Set the RTP ports range for audio and video streaming.
minimumRtpAudioPort | The minimum RTP port for audio stream. |
maximumRtpAudioPort | The maximum RTP port for audio stream. |
minimumRtpVideoPort | The minimum RTP port for video stream. |
maximumRtpVideoPort | The maximum RTP port for video stream. |
Int32 PortSIP.PortSIPLib.setRtcpPortRange | ( | Int32 | minimumRtcpAudioPort, |
Int32 | maximumRtcpAudioPort, | ||
Int32 | minimumRtcpVideoPort, | ||
Int32 | maximumRtcpVideoPort | ||
) |
Set the RTCP ports range for audio and video streaming.
minimumRtcpAudioPort | The minimum RTCP port for audio stream. |
maximumRtcpAudioPort | The maximum RTCP port for audio stream. |
minimumRtcpVideoPort | The minimum RTCP port for video stream. |
maximumRtcpVideoPort | The maximum RTCP port for video stream. |
Int32 PortSIP.PortSIPLib.enableCallForward | ( | Boolean | forBusyOnly, |
String | forwardTo | ||
) |
Enable call forward.
forBusyOnly | If this parameter is set as true, the SDK will forward all incoming calls when currently it's busy. If it's set as false, the SDK forward all incoming calls anyway. |
forwardTo | The call forward target. It must be like sip:xxxx@. sip. ports ip.c om |
Int32 PortSIP.PortSIPLib.disableCallForward | ( | ) |
Disable the call forwarding. The SDK is not forwarding any incoming call after this function is called.
Int32 PortSIP.PortSIPLib.enableSessionTimer | ( | Int32 | timerSeconds, |
SESSION_REFRESH_MODE | refreshMode | ||
) |
Allows to periodically refresh Session Initiation Protocol (SIP) sessions by sending INVITE requests repeatedly.
timerSeconds | The value of the refreshment interval in seconds. Minimum value of 90 seconds required. |
refreshMode | Allow to set the session refresh by UAC or UAS: SESSION_REFERESH_UAC or SESSION_REFERESH_UAS; |
Int32 PortSIP.PortSIPLib.disableSessionTimer | ( | ) |
Disable the session timer.
void PortSIP.PortSIPLib.setDoNotDisturb | ( | Boolean | state | ) |
Enable the "Do not disturb" to enable/disable.
state | If it is set to true, the SDK will reject all incoming calls anyway. |
Int32 PortSIP.PortSIPLib.enableAutoCheckMwi | ( | Boolean | state | ) |
Allows to enable/disable the check MWI (Message Waiting Indication) automatically.
state | If it is set as true, MWI will be checked automatically once successfully registered to a SIP proxy server. |
Int32 PortSIP.PortSIPLib.setRtpKeepAlive | ( | Boolean | state, |
Int32 | keepAlivePayloadType, | ||
Int32 | deltaTransmitTimeMS | ||
) |
Enable or disable to send RTP keep-alive packet when the call is established.
state | Set to true to allow to send the keep-alive packet during the conversation. |
keepAlivePayloadType | The payload type of the keep-alive RTP packet. It's usually set to 126. |
deltaTransmitTimeMS | The keep-alive RTP packet sending interval, in millisecond. Recommend value ranges 15000 - 300000. |
Int32 PortSIP.PortSIPLib.setKeepAliveTime | ( | Int32 | keepAliveTime | ) |
Enable or disable to send SIP keep-alive packet.
keepAliveTime | This is the SIP keep alive time interval in seconds. Set it to 0 to disable the SIP keep alive. Recommend to set as 30 or 50. |
Int32 PortSIP.PortSIPLib.getSipMessageHeaderValue | ( | String | sipMessage, |
String | headerName, | ||
StringBuilder | headerValue, | ||
Int32 | headerValueLength | ||
) |
Access the SIP header of SIP message.
sipMessage | The SIP message. |
headerName | The header which wishes to access the SIP message. |
headerValue | The buffer to receive header value. |
headerValueLength | The headerValue buffer size. Usually we recommend to set it more than 512 bytes. |
Int32 PortSIP.PortSIPLib.addSipMessageHeader | ( | Int32 | sessionId, |
String | methodName, | ||
Int32 | msgType, | ||
String | headerName, | ||
String | headerValue | ||
) |
Add the SIP Message header into the specified outgoing SIP message.
sessionId | Add the header to the SIP message with the specified session Id only. By setting to -1, it will be added to all messages. |
methodName | Just add the header to the SIP message with specified method name. For example: "INVITE", "REGISTER", "INFO" etc. If "ALL" specified, it will add all SIP messages. |
msgType | 1 refers to apply to the request message, 2 refers to apply to the response message, 3 refers to apply to both request and response. |
headerName | The custom header name that will appears in every outgoing SIP message. |
headerValue | The custom header value. |
Int32 PortSIP.PortSIPLib.removeAddedSipMessageHeader | ( | Int32 | sipMessageHeaderId | ) |
Remove the headers (custom header) added by addSipMessageHeader.
addedSipMessageId | The addedSipMessageId return by addSipMessageHeader. |
Int32 PortSIP.PortSIPLib.clearAddedSipMessageHeaders | ( | ) |
Clear the added extension headers (custom headers)
Int32 PortSIP.PortSIPLib.modifySipMessageHeader | ( | Int32 | sessionId, |
String | methodName, | ||
Int32 | msgType, | ||
String | headerName, | ||
String | headerValue | ||
) |
Modify the special SIP header value for every outgoing SIP message.
sessionId | The header to the SIP message with the specified session Id. By setting to -1, it will be added to all messages. |
methodName | Modify the header to the SIP message with specified method name only. For example: "INVITE", "REGISTER", "INFO" etc. If "ALL" specified, it will add all SIP messages. |
msgType | 1 refers to apply to the request message, 2 refers to apply to the response message, 3 refers to apply to both request and response. |
Int32 PortSIP.PortSIPLib.removeModifiedSipMessageHeader | ( | Int32 | sipMessageHeaderId | ) |
Remove the extension header (custom header) from every outgoing SIP message.
modifiedSipMessageId | The modifiedSipMessageId is returned by modifySipMessageHeader. |
Int32 PortSIP.PortSIPLib.clearModifiedSipMessageHeaders | ( | ) |
Clear the modified headers value, and do not modify every outgoing SIP message header values any longer.