![]() |
PortSIP VoIP SDK Manual for Android
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.
|
String com.portsip.PortSipSdk.getVersion | ( | ) |
Get the version number of the current SDK.
int com.portsip.PortSipSdk.enableRport | ( | boolean | enable | ) |
Enable/Disable rport(RFC3581).
enable | enable Set to true to enable the SDK to support rport. By default it is enabled. |
int com.portsip.PortSipSdk.enableEarlyMedia | ( | boolean | enable | ) |
Enable/disable rport(RFC3581).
enable | Set to true to enable the SDK to support rport. By default it is enabled. |
enable | Set to true to enable the SDK support Early Media. By default the Early Media is disabled. |
int com.portsip.PortSipSdk.enableReliableProvisional | ( | boolean | enable | ) |
Enable/Disable PRACK.
enable | Set to true to enable the SDK support PRACK. In default the PRACK is disabled. |
int com.portsip.PortSipSdk.enable3GppTags | ( | boolean | enable | ) |
Enable/disable the 3Gpp tags, including "ims.icsi.mmtel" and "g.3gpp.smsip".
enable | Set to true to enable 3Gpp tags for SDK. |
void com.portsip.PortSipSdk.enableCallbackSendingSignaling | ( | boolean | enable | ) |
Enable/disable the callback of the sent SIP messages.
enable | Set as true to enable the callback of the sent SIP messages, or false to disable it. Once enabled, the "onSendingSignaling" event will be triggered once the SDK sent a SIP message. |
void com.portsip.PortSipSdk.setSrtpPolicy | ( | int | enum_srtppolicy | ) |
Set the SRTP policy.
enum_srtppolicy | The SRTP policy.allow: ENUM_SRTPPOLICY_NONE, ENUM_SRTPPOLICY_FORCE, ENUM_SRTPPOLICY_PREFER. |
int com.portsip.PortSipSdk.setRtpPortRange | ( | int | minimumRtpAudioPort, |
int | maximumRtpAudioPort, | ||
int | minimumRtpVideoPort, | ||
int | maximumRtpVideoPort | ||
) |
This function allows to set the RTP port 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. |
int com.portsip.PortSipSdk.setRtcpPortRange | ( | int | minimumRtcpAudioPort, |
int | maximumRtcpAudioPort, | ||
int | minimumRtcpVideoPort, | ||
int | maximumRtcpVideoPort | ||
) |
This function allows to set the RTCP port 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. |
int com.portsip.PortSipSdk.enableCallForward | ( | boolean | forBusyOnly, |
String | forwardTo | ||
) |
Enable call forwarding.
forBusyOnly | If this parameter is set to true, the SDK will forward incoming calls when the user is currently busy. If set it to false, SDK will forward all incoming calls. |
forwardTo | The target to which the call will be forwarded. It must be in the format of sip:xxxx@. sip. ports ip.c om |
int com.portsip.PortSipSdk.disableCallForward | ( | ) |
Disable the call forwarding. The SDK will not forward any incoming call when this function is called.
int com.portsip.PortSipSdk.enableSessionTimer | ( | int | timerSeconds | ) |
This function allows to periodically refresh Session Initiation Protocol (SIP) sessions by sending repeated INVITE requests.
timerSeconds | The value of the refresh interval in seconds. A minimum of 90 seconds required. |
void com.portsip.PortSipSdk.disableSessionTimer | ( | ) |
Disable the session timer.
void com.portsip.PortSipSdk.setDoNotDisturb | ( | boolean | forBusyOnly | ) |
Enable/disable the "Do not disturb" status.
forBusyOnly | If it is set to true, the SDK will reject all incoming calls. |
void com.portsip.PortSipSdk.enableAutoCheckMwi | ( | boolean | state | ) |
Enable/disable the "Auto Check MWI" status.
state | If it is set to true, the SDK will check Mwi automatically. |
int com.portsip.PortSipSdk.setRtpKeepAlive | ( | boolean | state, |
int | keepAlivePayloadType, | ||
int | deltaTransmitTimeMS | ||
) |
Enable or disable to send RTP keep-alive packet when the call is ongoing.
state | When it's set to true, it's allowed 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 interval for sending keep-alive RTP packet, in millisecond. Recommended value ranges 15000 - 300000. |
int com.portsip.PortSipSdk.setKeepAliveTime | ( | int | keepAliveTime | ) |
Enable or disable to send SIP keep-alive packet.
keepAliveTime | This is the time interval for SIP keep-alive, in seconds. When it is set to 0, the SIP keep-alive will be disabled. Recommended value is 30 or 50. |
int com.portsip.PortSipSdk.setAudioSamples | ( | int | ptime, |
int | maxptime | ||
) |
Set the audio capture sample, which will be present in the SDP of INVITE and 200 OK message as "ptime and "maxptime" attribute.
ptime | It should be a multiple of 10 between 10 - 60 (included 10 and 60). |
maxptime | The "maxptime" attribute should be a multiple of 10 between 10 - 60 (included 10 and 60). It can't be less than "ptime". |
int com.portsip.PortSipSdk.addSupportedMimeType | ( | String | methodName, |
String | mimeType, | ||
String | subMimeType | ||
) |
Set the SDK to receive SIP messages that include special mime type.
methodName | Method name of the SIP message, such as INVITE, OPTION, INFO, MESSAGE, UPDATE, ACK etc. For more details please refer to RFC3261. |
mimeType | The mime type of SIP message. |
subMimeType | The sub mime type of SIP message. |
The SDK allows to receive SIP messages that include above mime types. Now if remote side send an INFO SIP message with its "Content-Type" header value "text/plain", SDK will reject this INFO message, because "text/plain" of INFO message is not included in the default type list. How should we enable the SDK to receive SIP INFO messages that include "text/plain" mime type? The answer is addSupportedMimyType:
If the user wishes to receive the NOTIFY message with "application/media_control+xml", it should be set as below:
For more details about the mime type, please visit: http://www.iana.org/assignments/media-types/