User Manual for Android

FAQ

Where can I download the PortSIP VoIP SDK for testing?

You can download the PortSIP VoIP SDK and sample projects from the PortSIP Website.

What Android API version is required?

The PortSIP VoIP SDK requires Android API version 16 or later.

How can I create a new project with the PortSIP VoIP SDK?

  1. Download the Sample Project and SDK: Obtain the sample project and trial SDK from the PortSIP Website and extract them to a desired directory.

  2. Create a New Project: In Android Studio, create a new Android Application project.

  3. Add the SDK Libraries: Copy all files from the libs directory of the extracted SDK to the libs directory of your new application.

  4. Import Necessary Classes: Import the required classes from the SDK:

    import com.portsip.OnPortSIPEvent;
    import com.portsip.PortSipSdk;

How can I process callback events?

  1. Implement the OnPortSIPEvent Interface: Your class should implement the OnPortSIPEvent interface to handle callback events.

  2. Override Callback Methods: Override the necessary callback methods (e.g., onRegistrationState, onCallState) to handle specific events.

How do I initialize the SDK?

  1. Create an Instance: Create an instance of the PortSipSdk class.

  2. Set the Event Listener: Set the event listener using setOnPortSIPEvent.

  3. Create a Call Manager: Create a call manager using CreateCallManager.

  4. Initialize the SDK: Call the initialize method with appropriate parameters.

Is the SDK thread-safe?

Yes, the PortSIP SDK is thread-safe. You can call API functions from multiple threads without worrying about synchronization issues. However, there are exceptions: the onAudioRawCallback, onVideoRawCallback, and onRTPPacketCallback callbacks should not be called directly from other threads.

SDK Callback events

Register events

void onRegisterSuccess(String reason, int code,String sipMessage);

When successfully registered to server, this event will be triggered.

Parameters

void onRegisterFailure(String reason, int code,String sipMessage);

When failed to register to SIP server, this event will be triggered.

Parameters

Call events

void onInviteIncoming(long sessionId,
                      String callerDisplayName,
                      String caller,
                      String calleeDisplayName,
                      String callee,
                      String audioCodecs,
                      String videoCodecs,
                      boolean existsAudio,
                      boolean existsVideo,
                      String sipMessage);

When a call is coming, this event will be triggered.

Parameters

void onInviteTrying(long sessionId);

If the outgoing call is being processed, this event will be triggered.

Parameters

void onInviteSessionProgress(long sessionId,
                             String audioCodecs,
                             String videoCodecs,
                             boolean existsEarlyMedia,
                             boolean existsAudio,
                             boolean existsVideo,
                             String sipMessage);

Once the caller received the "183 session progress" message, this event would be triggered.

Parameters

void onInviteRinging(long sessionId,
                                String statusText,
                                int statusCode,
                                String sipMessage);

If the outgoing call is ringing, this event will be triggered.

Parameters

void onInviteAnswered(long sessionId,
                      String callerDisplayName,
                      String caller,
                      String calleeDisplayName,
                      String callee,
                      String audioCodecs,
                      String videoCodecs,
                      boolean existsAudio,
                      boolean existsVideo,
                      String sipMessage);

If the remote party answered the call, this event would be triggered.

Parameters

void onInviteFailure(long sessionId, String callerDisplayName,
                                String caller,
                                String calleeDisplayName,
                                String callee,
                                String reason,
                                int code,
                                String sipMessage);

This event will be triggered if the outgoing or incoming call fails.

Parameters

public void onInviteUpdated(long sessionId,
                            String audioCodecs,
                            String videoCodecs,
                            String screenCodecs,
                            boolean existsAudio,
                            boolean existsVideo,
                            boolean existsScreen,
                            String sipMessage);

This event will be triggered when remote party updates the call.

Parameters

void onInviteConnected(long sessionId);

This event will be triggered when UAC sent/UAS received ACK (the call is connected). Some functions (hold, updateCall etc...) can be called only after the call connected, otherwise the functions will return error.

Parameters

void onInviteBeginingForward(String forwardTo);

If the enableCallForward method is called and a call is incoming, the call will be forwarded automatically and this event will be triggered.

Parameters

void onInviteClosed(long sessionId, String sipMessage);

This event is triggered once remote side ends the call.

Parameters

void onDialogStateUpdated(String BLFMonitoredUri,
                          String BLFDialogState,
                          String BLFDialogId,
                          String BLFDialogDirection);

If a user subscribed and his dialog status monitored, when the monitored user is holding a call or is being rang, this event will be triggered.

Parameters

void onRemoteHold(long sessionId);

If the remote side places the call on hold, this event will be triggered.

Parameters

void onRemoteUnHold(long sessionId,
                               String audioCodecs,
                               String videoCodecs,
                               boolean existsAudio,
                               boolean existsVideo);

If the remote side un-holds the call, this event will be triggered Parameters

Refer events

    public void onReceivedRefer(long sessionId,
                         long referId,
                         String to,
                         String from,
                         String referSipMessage);

This event will be triggered once received a REFER message.

Parameters

void onReferAccepted(long sessionId);

This callback will be triggered once remote side calls "acceptRefer" to accept the REFER Parameters

void onReferRejected(long sessionId, String reason, int code);

This callback will be triggered once remote side calls "rejectRefer" to reject the REFER Parameters

void onTransferTrying(long sessionId);

When the refer call is being processed, this event will be triggered.

Parameters

void onTransferRinging(long sessionId);

When the refer call is ringing, this event will be triggered.

Parameters

void onACTVTransferSuccess(long sessionId);

When the refer call succeeds, this event will be triggered. The ACTV means Active. For example, A establishes the call with B, A transfers B to C, C accepts the refer call, and A will receive this event.

Parameters

void onACTVTransferFailure(long sessionId, String reason, int code);

When the refer call fails, this event will be triggered. The ACTV means Active. For example, A establish the call with B, A transfers B to C, C rejects this refer call, and A will receive this event.

Parameters

Signaling events

void onReceivedSignaling(long sessionId, String message);

This event will be triggered when receiving a SIP message. This event is disabled by default. To enable, use enableCallbackSignaling.

Parameters

void onSendingSignaling (long sessionId, String  message)

This event will be triggered when sent a SIP message. This event is disabled by default. To enable, use enableCallbackSignaling.

Parameters

MWI events

void onWaitingVoiceMessage(String messageAccount,
                           int urgentNewMessageCount,
                           int urgentOldMessageCount,
                           int newMessageCount,
                           int oldMessageCount);

If there is the waiting voice message (MWI), this event will be triggered.

Parameters

void onWaitingFaxMessage(String messageAccount,
                         int urgentNewMessageCount,
                         int urgentOldMessageCount,
                         int newMessageCount,
                         int oldMessageCount);

If there is waiting fax message (MWI), this event will be triggered.

Parameters

DTMF events

void onRecvDtmfTone(long sessionId, int tone);

This event will be triggered when receiving a DTMF tone from remote side.

Parameters

INFO/OPTIONS message events

void onRecvOptions(String optionsMessage);

This event will be triggered when receiving the OPTIONS message.

Parameters

void onRecvInfo(String infoMessage);

This event will be triggered when receiving the INFO message.

Parameters

void onRecvNotifyOfSubscription(long subscribeId,String notifyMessage,
                                byte[] messageData,
                                int messageDataLength);

This event will be triggered when receiving a NOTIFY message of the subscription.

Parameters

Presence events

void onPresenceRecvSubscribe(long subscribeId,
                             String fromDisplayName,
                             String from,
                             String subject);

This event will be triggered when receiving the SUBSCRIBE request from a contact.

Parameters

void onPresenceOnline(String fromDisplayName,
                      String from,
                      String stateText);

When the contact is online or changes presence status, this event will be triggered.

Parameters

void onPresenceOffline(String fromDisplayName,
                       String from);

When the contact is offline, this event will be triggered.

Parameters

void onRecvMessage(long sessionId,
                   String mimeType,
                   String subMimeType,
                   byte[] messageData,
                   int messageDataLength);

This event will be triggered when receiving a MESSAGE message in dialog.

Parameters

void onRecvOutOfDialogMessage(String fromDisplayName,
                              String from,
                              String toDisplayName,
                              String to,
                              String mimeType,
                              String subMimeType,
                              byte[] messageData,
                              int messageDataLength,
                              String sipMessage);

This event will be triggered when receiving a MESSAGE message out of dialog. For example pager message.

Parameters

void onSendMessageSuccess(long sessionId, long messageId,String sipMessage);

If the message is sent successfully in dialog, this event will be triggered.

Parameters

void onSendMessageFailure(long sessionId,
                          long messageId,
                          String reason,
                          int code,
                          String sipMessage);

If the message is failed to be sent out of dialog, this event will be triggered.

Parameters

void onSendOutOfDialogMessageSuccess( long messageId,
                                      String fromDisplayName,
                                      String from,
                                      String toDisplayName,
                                      String to,
                                      String sipMessage);

If the message is sent successfully out of dialog, this event will be triggered.

Parameters

void onSendOutOfDialogMessageFailure(long messageId,
                                     String fromDisplayName,
                                     String from,
                                     String toDisplayName,
                                     String to,
                                     String reason,
                                     int code,
                                     String sipMessage);

If the message failed to be sent out of dialog, this event would be triggered.

Parameters

void onSubscriptionFailure(long subscribeId, int statusCode);

This event will be triggered on sending SUBSCRIBE failure.

Parameters

void onSubscriptionTerminated(long subscribeId);

This event will be triggered when a SUBSCRIPTION is terminated or expired.

Parameters

audio device changed,Play audio and video file finished events

void onPlayFileFinished(long sessionId, String fileName);

If called startPlayingFileToRemote function with no loop mode, this event will be triggered once the file play finished.

Parameters

void onStatistics(long sessionId,String statistics);

If called getStatistics function, this event will be triggered once the statistics get finished.

Parameters

void onAudioDeviceChanged(PortSipEnumDefine.AudioDevice audioDevice, Set<PortSipEnumDefine.AudioDevice> devices);

fired When available audio devices changed or audio device currently in use changed.

Parameters

void onAudioFocusChange(int focusChange);

fired when the audio focus has been changed.

Parameters

RTP callback events

void onRTPPacketCallback(long sessionId,
                         int mediaType,
                         int enum_direction,
                         byte[] RTPPacket, 
                         int packetSize);

If enableRtpCallback function is called to enable the RTP callback, this event will be triggered once a RTP packet is received or sent.

Parameters

Remarks

Donot call any SDK API functions in this event directly. If you want to call the API functions or other code which is time-consuming, you should post a message to another thread and execute SDK API functions or other code in another thread.

Audio and video stream callback events

void onAudioRawCallback(long sessionId,
                        int enum_direction,
                        byte[] data, 
                        int dataLength,
                        int samplingFreqHz);

This event will be triggered once receiving the audio packets if called enableAudioStreamCallback function.

Parameters

Remarks

Don't call any SDK API functions in this event directly. If you want to call the API functions or other code which is time-consuming, you should post a message to another thread and execute SDK API functions or other code in another thread.

See also

PortSipSdk::enableAudioStreamCallback

void onVideoRawCallback(long sessionId,
                        int enum_direction, 
                        int width, 
                        int height,
                        byte[] data, 
                        int dataLength);

This event will be triggered once receiving the video packets if enableVideoStreamCallback function is called.

Parameters

See also

PortSipSdk::enableVideoStreamCallback

SDK functions

Initialize and register functions

int initialize(int enum_transport, 
						  String localIP, 
						  int localSIPPort, 
						  int enum_LogLevel,
						  String LogPath, 
						  int maxLines, 
						  String agent,
						  int audioDeviceLayer, 
						  int videoDeviceLayer, 
						  String TLSCertificatesRootPath,
						  String TLSCipherList, 
						  boolean verifyTLSCertificate, 
						  String dnsServers)

Initialize the SDK.

Parameters

Returns

If the function succeeds, it returns value 0. If the function fails, it will return a specific error code

void unInitialize() 

Un-initialize the SDK and release resources.

int setInstanceId(String instanceId)

Set the instance Id, the outbound instanceId((RFC5626) ) used in contact headers.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setUser(String userName, 
					   String displayName, 
					   String authName,
					   String password, 
					   String userDomain, 
					   String SIPServer, 
					   int SIPServerPort,
					   String STUNServer, 
					   int STUNServerPort, 
					   String outboundServer,
					   int outboundServerPort)

Set user account info.

Parameters

Returns

If this function succeeds, it will return value 0. If it fails, it will return a specific error code.

void removeUser() 

remove user account info.

int registerServer(int expires, int retryTimes)

Register to SIP proxy server (login to server)

Parameters

Returns

If this function succeeds, it will return value 0. If fails, it will return a specific error code.

If the registration to server succeeds, onRegisterSuccess will be triggered; otherwise onRegisterFailure will be triggered.

int refreshRegistration(int expires) 

Refresh the registration manually after successfully registered.

Parameters

Returns

If this function succeeds, it will return value 0. If fails, it will return a specific error code.

If the registration to server succeeds, onRegisterSuccess will be triggered; otherwise onRegisterFailure will be triggered.

int unRegisterServer(int waitMS)

Un-register from the SIP proxy server.

Parameters

Returns

If this function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setDisplayName(String displayName)

Set the display name of user.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setLicenseKey (String  key)

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

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Audio and video codecs functions

int addAudioCodec (int  enum_audiocodec)

Enable an audio codec, and it will be shown in SDP.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int addVideoCodec (int  enum_videocodec)

Enable a video codec, and it will be shown in SDP.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

**boolean isAudioCodecEmpty ()

Detect if the audio codecs are enabled.

Returns

If no audio codec enabled, it will return value true; otherwise it returns false.

**boolean isVideoCodecEmpty ()

Detect if the video codecs are enabled.

Returns

If no video codec enabled, it will return value true; otherwise it returns false.

int setAudioCodecPayloadType (int  enum_audiocodec, int  payloadType)

Set the RTP payload type for dynamic audio codec.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoCodecPayloadType (int  enum_videocodec, int  payloadType)

Set the RTP payload type for dynamic video codec.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void clearAudioCodec ()

Remove all the enabled audio codecs.

void clearVideoCodec ()

Remove all the enabled video codecs.

int setAudioCodecParameter (int  enum_audiocodec, String  sdpParameter)

Set the codec parameter for audio codec.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

See also

PortSipEnumDefine

Remarks

Example:

setAudioCodecParameter(AUDIOCODEC_AMR, "mode-set=0; octet-align=1; robust-sorting=0"![])

int setVideoCodecParameter (int  enum_videocodec, String  sdpParameter)

Set the codec parameter for video codec.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

Example:

setVideoCodecParameter(PortSipEnumDefine.enum_VIDEOCODEC_H264, profile-level-id=420033; packetization-mode=0");

Additional settings functions

String getVersion ()

Get the version number of the current SDK.

Returns

String with version description

int enableRport (boolean  enable)

Enable/Disable rport(RFC3581).

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int enableEarlyMedia (boolean  enable)

Enable/disable rport(RFC3581).

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code. Enable/Disable Early Media.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int enablePriorityIPv6Domain (boolean  enable)

Enable/disable which allows specifying the preferred protocol when a domain supports

both IPV4 and IPV6 simultaneously.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setUriUserEncoding (String  character, boolean  enable)

Modifies the default URI user character needs to be escaped.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setReliableProvisional (int  mode)

Enable/Disable PRACK.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int enable3GppTags (boolean  enable)

Enable/disable the 3Gpp tags, including "ims.icsi.mmtel" and "g.3gpp.smsip".

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void enableCallbackSignaling (boolean   enableSending, boolean  enableReceived)

Enable/disable the callback of the SIP messages.

Parameters

void setSrtpPolicy (int  enum_srtppolicy)

Set the SRTP policy.

Parameters

int setRtpPortRange (int  minimumRtpPort, int  maximumRtpPort)

This function allows to set the RTP port range for audio and video streaming.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

The port range ((max - min) / maxCallLines) should be greater than 4.

int enableCallForward (boolean  forBusyOnly, String   forwardTo)

Enable call forwarding.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int disableCallForward ()

Disable the call forwarding. The SDK will not forward any incoming call when this function is called.

Returns

If the function succeeds, it will not return value 0. If the function fails, it will return a specific error code.

int enableSessionTimer (int  timerSeconds)

This function allows to periodically refresh Session Initiation Protocol (SIP) sessions by

sending repeated INVITE requests.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

The repeated INVITE requests, or re-INVITEs, are sent during an active call log to allow user agents (UA) or proxies to determine the status of a SIP session. Without this keep-alive mechanism, proxies that remember incoming and outgoing requests (stateful proxies) may continue to retain call state in vain. If a UA fails to send a BYE message at the end of a session, or if the BYE message is lost due to network problems, a stateful proxy will not know that the session has ended. The re-INVITES ensure that active sessions stay active and completed sessions are terminated.

void disableSessionTimer ()

Disable the session timer.

void setDoNotDisturb (boolean  state)

Enable/disable the "Do not disturb" status.

Parameters

void enableAutoCheckMwi (boolean  state)

Enable/disable the "Auto Check MWI" status.

Parameters

int setRtpKeepAlive (boolean  state, int  keepAlivePayloadType, int  deltaTransmitTimeMS)

Enable or disable to send RTP keep-alive packet when the call is ongoing.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setKeepAliveTime (int  keepAliveTime)

Enable or disable to send SIP keep-alive packet.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int 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.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int addSupportedMimeType (String  methodName, String  mimeType, String  subMimeType)

Set the SDK to receive SIP messages that include special mime type.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

In default, PortSIP VoIP SDK supports media types (mime types) included in the below incoming SIP messages:

"message/sipfrag" in NOTIFY message.

"application/simple-message-summary" in NOTIFY message.

"text/plain" in MESSAGE message. "application/dtmf-relay" in INFO message. "application/media_control+xml" in INFO 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:

addSupportedMimeType("INFO", "text", "plain");

If the user wishes to receive the NOTIFY message with "application/media_control+xml", it should be set as below:

addSupportedMimeType("NOTIFY", "application", "media_control+xml");

For more details about the mime type, please visit: http://www.iana.org/assignments/media-types/

Access SIP message header functions

String getSipMessageHeaderValue (String  sipMessage, String  headerName)

Access the SIP header of SIP message.

Parameters

Returns

String. The SIP header of SIP message.

long addSipMessageHeader(long sessionId, 
									       String methodName, 
									       int msgType, 
									       String headerName,
									       String headerValue)

Add the SIP Message header into the specified outgoing SIP message.

Parameters

Returns

If the function succeeds, it will return the addedSipMessageId , which is greater than 0. If the function fails, it will return a specific error code.

int removeAddedSipMessageHeader (long  addedSipMessageId)

Remove the headers (custom header) added by addSipMessageHeader.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void clearAddedSipMessageHeaders ()

Clear the added extension headers (custom headers)

Remarks

For example, we have added two custom headers into every outgoing SIP message and want to have them removed.

addSipMessageHeader(-1,"ALL",3,"Blling", "usd100.00");
addSipMessageHeader(-1,"ALL",3,"ServiceId", "8873456"); 
clearAddedSipMessageHeaders(); 

If this function is called, the added extension headers will no longer appear in outgoing SIP message.

long modifySipMessageHeader(long sessionId, 
									          String methodName, 
									          int msgType,
									          String headerName, 
									          String headerValue)

Modify the special SIP header value for every outgoing SIP message.

Parameters

Returns

If the function succeeds, it will return modifiedSipMessageId, which is greater than 0. If the function fails, it will return a specific error code.

Remarks

Example: modify "Expires" header and "User-Agent" header value for every outgoing SIP message:

modifySipMessageHeader(-1,"ALL",3, "Expires", "1000"); modifySipMessageHeader(-1,"ALL",3, "User-Agent", "MyTest Softphone 1.0");

int removeModifiedSipMessageHeader (long  modifiedSipMessageId)

Remove the headers (custom header) added by modifiedSipMessageId.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void clearModifiedSipMessageHeaders ()

Clear the modify headers value. Once cleared, it will no longer modify every outgoing SIP message header values.

Remarks Example: modify two headers value for every outgoing SIP message and then clear it:

  modifySipMessageHeader(-1,"ALL",3, "Expires", "1000"); 
  modifySipMessageHeader(-1,"ALL",3, "User-Agent", "MyTest Softphone 1.0");   
  cleaModifyHeaders();

Parameters

Audio and video functions

int setVideoDeviceId (int  deviceId)

Set the video device that will be used for video call. Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoOrientation (int  rotation)

Setting the video Device Orientation.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int enableVideoHardwareCodec (boolean  enableHWEncoder, boolean  enableHWDecoder)

Set enable/disable video Hardware codec.

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoResolution (int  width, int  height)

Set the video capturing resolution.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setAudioBitrate (long  sessionId, int  enum_audiocodec, int  bitrateKbps)

Set the audio bitrate. Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoBitrate (long  sessionId, int  bitrateKbps)

Set the video bitrate.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoFrameRate (long  sessionId, int  frameRate)

Set the video frame rate. Usually you do not need to call this function to set the frame rate since the SDK uses default frame rate.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int sendVideo (long  sessionId, boolean  send)

Send the video to remote side.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setRemoteVideoWindow (long  sessionId, PortSIPVideoRenderer  renderer)

Set the window for a session that is used for displaying the received remote video image.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setRemoteScreenWindow (long  sessionId, PortSIPVideoRenderer  renderer)

Set the window for a session that is used for displaying the received remote screen image.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void displayLocalVideo (boolean   state, boolean  mirror, PortSIPVideoRenderer  renderer)

Start/stop displaying the local video image.

Parameters

int setVideoNackStatus (boolean  state)

Enable/disable the NACK feature (rfc6642) which helps to improve the video quality.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setChannelOutputVolumeScaling (long  sessionId, int  scaling)

Set a volume |scaling| to be applied to the outgoing signal of a specific audio channel.

47 Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setChannelInputVolumeScaling (long  sessionId, int  scaling)

Set a volume |scaling| to be applied to the microphone signal of a specific audio channel.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void enableAudioManager (boolean   state)

enable/disable sdk audio manager,when enable sdk will auto manager audio device input/output. if the state is enabled, the onAudioDeviceChanged event will be triggered when available audio devices changed or audio device currently in use changed .

Parameters

Set<PortSipEnumDefine.AudioDevice> getAudioDevices ()

Get current set of available/selectable audio devices.

Returns

Current set of available/selectable audio devices.

int setAudioDevice (PortSipEnumDefine.AudioDevice  defaultDevice)

Set the audio device that will used for audio call. For Android and iOS, switch between earphone and Loudspeaker allowed.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Call functions

long call (String  callee, boolean  sendSdp, boolean  videoCall)

Make a call

Parameters

Returns

If the function succeeds, it will return the session ID of the call, which is greater than 0. If the function fails, it will return a specific error code.

Note: the function success just means the outgoing call is processing, you need to detect the call final state in onInviteTrying, onInviteRinging, onInviteFailure callback events.

int rejectCall (long  sessionId, int  code)

rejectCall Reject the incoming call.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int hangUp (long  sessionId)

hangUp Hang up the call.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int answerCall (long  sessionId, boolean  videoCall)

answerCall Answer the incoming call.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int updateCall (long  sessionId, boolean  enableAudio, boolean  enableVideo)

updateCall Use the re-INVITE to update the established call.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return specific error code.

Remarks

Example usage:

Example 1: A called B with the audio only, and B answered A, there would be an audio conversation between A and B. Now A want to see B through video, A could use these functions to fulfill it.

clearVideoCodec(); addVideoCodec(VIDEOCODEC_H264); updateCall(sessionId, true, true);

Example 2: Remove video stream from the current conversation. updateCall(sessionId, true, false);

int hold (long  sessionId)

To place a call on hold.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int unHold (long  sessionId)

Take off hold.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int muteSession(long sessionId, 
						    boolean muteIncomingAudio,
						    boolean muteOutgoingAudio, 
						    boolean muteIncomingVideo,
						    boolean muteOutgoingVideo) 

Mute the specified audio or video session.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int forwardCall (long  sessionId, String   forwardTo)

Forward call to another one when receiving the incoming call.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return value a specific error code.

long pickupBLFCall (String  replaceDialogId, boolean  videoCall)

This function will be used for picking up a call based on the BLF (Busy Lamp Field) status.

Parameters

If the function succeeds, it will return a session ID that is greater than 0 to the new call, otherwise returns a specific error code that is less than 0.

Remarks

The scenario is:

  1. User 101 subscribed the user 100's call status: sendSubscription(mSipLib, "100", "dialog");

  2. When 100 holds a call or 100 is ringing, onDialogStateUpdated callback will be triggered, and 101 will receive this callback. Now 101 can use pickupBLFCall function to pick the call rather than 100 to talk with caller.

int sendDtmf (long  sessionId, 
              int  enum_dtmfMethod, 
              int  code, 
              int  dtmfDuration, 
              boolean  playDtmfTone)

Send DTMF tone.

Parameters

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Refer functions

int refer (long  sessionId, String  referTo)

Transfer the current call to another callee.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

refer(sessionId, "sip:testuser12@sip.portsip.com");

You can refer to the video on Youtube at:

https://www.youtube.com/watch?v=_2w9EGgr3FY, which will demonstrate how to complete the transfer.

int attendedRefer (long  sessionId, long  replaceSessionId, String  referTo)

Make an attended refer. Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

Please read the sample project source code to get more details, or you can refer to the video on YouTube at:

https://www.youtube.com/watch?v=_2w9EGgr3FY

Note: Please use Windows Media Player to play the AVI file, which demonstrates how to complete the transfer.

int attendedRefer2(long sessionId, 
							     long replaceSessionId, 
							     String replaceMethod,
							     String target,
							     String referTo)

Make an attended refer.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int outOfDialogRefer (long  replaceSessionId, String  replaceMethod, String  target, String  referTo)

Make an attended refer.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

long acceptRefer (long  referId, String  referSignaling)

By accepting the REFER request, a new call will be made if this function is called. The

function is usually called after onReceivedRefer callback event.

Parameters

Returns

If the function succeeds, it will return a session ID greater than 0 to the new call for REFER; otherwise it will return a specific error code less than 0;

int rejectRefer (long  referId)

Reject the REFER request.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Send audio and video stream functions

int enableSendPcmStreamToRemote (long  sessionId, boolean  state, int  streamSamplesPerSec)

Enable the SDK send PCM stream data to remote side from another source instead of microphone. This function MUST be called first to send the PCM stream data to another

side.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int sendPcmStreamToRemote (long  sessionId, byte[]  data, int  dataLength)

Send the audio stream in PCM format from another source instead of audio device

capturing (microphone).

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

Usually we should use it like below:

enableSendPcmStreamToRemote(sessionId, true, 16000); 
sendPcmStreamToRemote(sessionId, data, dataSize); 

You can't have too much audio data at one time as we have 100ms audio buffer only. Once you put too much, data will be lost. It is recommended to send 20ms audio data every 20ms.

int enableSendVideoStreamToRemote (long  sessionId, boolean  state)

Enable the SDK to send video stream data to remote side from another source instead of camera.

This function MUST be called first to send the video stream data to another side.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int sendVideoStreamToRemote (long  sessionId, byte[]  data, int  dataLength, int  width, int  height)

Send the video stream in i420 from another source instead of video device capturing (camera).

Before calling this function, you MUST call the enableSendVideoStreamToRemote function.

Parameters

Returns

If the function succeeds, it will return value is 0. If the function fails, it will return a specific error code.

RTP packets, Audio stream and video stream callback

long enableRtpCallback (long  sessionId, int  mediaType, int  directionMode)

Set the RTP callbacks to allow access to the sent and received RTP packets.

Parameters

Returns

If the function succeeds, it will return value is 0. If the function fails, it will return a specific error code.

void enableAudioStreamCallback (long  sessionId, boolean  enable, int  enum_direction)

Enable/disable the audio stream callback. The onAudioRawCallback event will be triggered if the callback is enabled.

Parameters

void enableVideoStreamCallback (long  sessionId, int  enum_direction)

Enable/disable the video stream callback, the onVideoRawCallback event will be triggered if the callback is enabled.

Parameters

Record functions

int startRecord(long sessionId, 
						    String recordFilePath,
						    String recordFileName, 
						    boolean appendTimeStamp,
						    int audioChannels,
						    int enum_fileFormat,
						    int enum_audioRecordMode,
						    int enum_videoRecordMode)

Start recording the call.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int stopRecord (long  sessionId)

Stop recording.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Play audio and video file and RTMP/RTSP stream functions

int startPlayingFileToRemote (long  sessionId, String  fileUrl, boolean  loop, int  playAudio)

Play an local file or RTSP/RTMP stream to remote party.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int stopPlayingFileToRemote (long  sessionId)

Stop play file to remote side.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int startPlayingFileLocally (String  fileUrl, boolean  loop, PortSIPVideoRenderer  renderer)

Play an local file or RTSP/RTMP stream.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int stopPlayingFileLocally ()

Stop play file locally.

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void audioPlayLoopbackTest (boolean  enable)

Used for testing loopback for the audio device.

Parameters

Conference functions

int createAudioConference ()

Create an audio conference. It will fail if the existing conference is not ended yet. Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int createVideoConference(PortSIPVideoRenderer conferenceVideoWindow,
									 int videoWidth, 
									 int videoHeight, 
									 int layout)

Create a video conference. It will fail if the existing conference is not ended yet.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

void destroyConference ()

End the exist conference.

int setConferenceVideoWindow (PortSIPVideoRenderer  conferenceVideoWindow)

Set the window for a conference that is used for displaying the received remote video

image.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int joinToConference (long  sessionId)

Join a session into existing conference. If the call is in hold, it will be un-hold

automatically.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int removeFromConference (long  sessionId)

Remove a session from an existing conference.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

RTP and RTCP QOS functions

int setAudioRtcpBandwidth (long  sessionId, int  BitsRR, int  BitsRS, int  KBitsAS)

Set the audio RTCP bandwidth parameters as RFC3556.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoRtcpBandwidth (long  sessionId, int  BitsRR, int  BitsRS, int  KBitsAS)

Set the video RTCP bandwidth parameters as the RFC3556.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int enableAudioQos (boolean  state)

Set the DSCP (differentiated services code point) value of QoS (Quality of Service) for audio channel.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int enableVideoQos (boolean  state)

Set the DSCP(differentiated services code point) value of QoS(Quality of Service) for video channel.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setVideoMTU (int  mtu)

Set the MTU size for video RTP packet.

Parameters

Returns

If the function succeeds, the return value is 0. If the function fails, the return value is a specific error code.

RTP statistics functions

int getStatistics (long  sessionId)

Obtain the statistics of channel. the event onStatistics will be triggered.

Parameters

Returns

If the function succeeds, it will return value is 0. If the function fails, it will return a specific error code.

Audio effect functions

void enableVAD (boolean  state)

Enable/disable Voice Activity Detection(VAD).

Parameters

void enableAEC (boolean  state)

Enable/disable AEC (Acoustic Echo Cancellation).

Parameters

void enableCNG (boolean  state)

Enable/disable Comfort Noise Generator(CNG).

Parameters

void enableAGC (boolean  state)

Enable/disable Automatic Gain Control(AGC).

Parameters

void enableANS (boolean  state)

Enable/disable Audio Noise Suppression(ANS).

Parameters

Send OPTIONS/INFO/MESSAGE functions

int sendOptions (String  to, String  sdp)

Send OPTIONS message.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return value a specific error code.

int sendInfo (long  sessionId, String  mimeType, String  subMimeType, String  infoContents)

Send a INFO message to remote side in dialog.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

long sendMessage(long sessionId, 
							   String mimeType,
							   String subMimeType, 
							   byte[] message, 
							   int messageLength)

Send a MESSAGE message to remote side in dialog.

Parameters

Returns

If the function succeeds, it will return a message ID that allows to track the message sending state in onSendMessageSuccess and onSendMessageFailure. If the function fails, it will return a specific error code that is less than 0.

Remarks

Example 1: Send a plain text message. Note: to send other languages text, please use the UTF8 to encode the message before sending.

sendMessage(sessionId, "text", "plain", "hello",6);

Example 2: Send a binary message.

sendMessage(sessionId, "application", "vnd.3gpp.sms", binData, binDataSize);

long sendOutOfDialogMessage (String  to, String  mimeType, String  subMimeType, boolean  isSMS, byte[]  message, int  messageLength)

Send a out of dialog MESSAGE message to remote side.

Parameters

Returns

If the function succeeds, it will return a message ID that allows to track the message sending state in onSendOutOfMessageSuccess and onSendOutOfMessageFailure. If the function fails, it will return a specific error code that is less than 0.

Remarks

Example 1: Send a plain text message. Note: to send other languages text, please use the UTF8 to encode the message before sending.

sendOutOfDialogMessage("sip:user1@sip.portsip.com", "text", "plain", "hello", 6);

Example 2: Send a binary message.

sendOutOfDialogMessage("sip:user1@sip.portsip.com","application", "vnd.3gpp.sms", binData, binDataSize);

long setPresenceMode (int  mode)

Indicate the SDK uses the P2P mode for presence or presence agent mode.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

Since presence agent mode requires the PBX/Server support the PUBLISH, please ensure you have your server and PortSIP PBX support this feature. For more details please visit: https://www.portsip.com/portsip-pbx

long setDefaultSubscriptionTime (int  secs)

Set the default expiration time to be used when creating a subscription.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

long setDefaultPublicationTime (int  secs)

Set the default expiration time to be used when creating a publication.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

long presenceSubscribe (String  contact, String  subject)

Send a SUBSCRIBE message for presence to a contact.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int presenceTerminateSubscribe (long   subscribeId)

Terminate the given presence subscription.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int presenceAcceptSubscribe (long   subscribeId)

Accept the presence SUBSCRIBE request which received from contact.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int presenceRejectSubscribe (long   subscribeId)

Reject a presence SUBSCRIBE request received from contact.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

int setPresenceStatus (long   subscribeId, String  statusText)

Send a NOTIFY message to contact to notify that presence status is online/offline/changed.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

long sendSubscription (String  to, String  eventName)

Send a SUBSCRIBE message to subscribe an event.

Parameters

Returns

If the function succeeds, it will return the ID of that SUBSCRIBE which is greater than 0. If the function fails, it will return a specific error code which is less than 0.

Remarks

Example 1, below code indicates that user/extension 101 is subscribed to MWI (Message Waiting notifications) for checking his voicemail: int32 mwiSubId = sendSubscription("sip:101@test.com", "message-summary");

Example 2, to monitor a user/extension call status, You can use code: sendSubscription(mSipLib, "100", "dialog"); Extension 100 refers to the user/extension to be monitored. Once being monitored, when extension 100 hold a call or is ringing, the onDialogStateUpdated callback will be triggered.

int terminateSubscription (long   subscribeId)

Terminate the given subscription.

Parameters

Returns

If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

Remarks

For example, if you want stop check the MWI, use below code:

terminateSubscription(mwiSubId);

Class Documentation

com.portsip.PortSipEnumDefine

com.portsip.PortSipEnumDefine.AudioDevice Enum Reference

Public Attributes

  • SPEAKER_PHONE

  • WIRED_HEADSET

  • EARPIECE

  • BLUETOOTH

  • NONE

Detailed Description

AudioDevice list possible audio devices that we currently support.

Static Public Attributes

  • static final int enum_AUDIOCODEC_G729 = 18

  • static final int enum_AUDIOCODEC_PCMA = 8

  • static final int enum_AUDIOCODEC_PCMU = 0

  • static final int enum_AUDIOCODEC_GSM = 3

  • static final int enum_AUDIOCODEC_G722 = 9

  • static final int enum_AUDIOCODEC_ILBC = 97

  • static final int enum_AUDIOCODEC_AMR = 98

  • static final int enum_AUDIOCODEC_AMRWB = 99

  • static final int enum_AUDIOCODEC_SPEEX = 100

  • static final int enum_AUDIOCODEC_SPEEXWB =102

  • static final int enum_AUDIOCODEC_ISACWB = 103

  • static final int enum_AUDIOCODEC_ISACSWB =104

  • static final int enum_AUDIOCODEC_OPUS =105

  • static final int enum_AUDIOCODEC_DTMF = 101

  • static final int enum_VIDEOCODEC_NONE = -1

  • static final int enum_VIDEOCODEC_I420 = 133

  • static final int enum_VIDEOCODEC_H264 = 125

  • static final int enum_VIDEOCODEC_VP8 = 120

  • static final int enum_VIDEOCODEC_VP9 = 122

  • static final int enum_SRTPPOLICY_NONE = 0

  • static final int enum_SRTPPOLICY_FORCE = 1

  • static final int enum_SRTPPOLICY_PREFER = 2

  • static final int enum_TRANSPORT_UDP = 0

  • static final int enum_TRANSPORT_TLS = 1

  • static final int enum_TRANSPORT_TCP = 2

  • static final int enum_LOG_LEVEL_NONE = -1

  • static final int enum_LOG_LEVEL_ERROR = 1

  • static final int enum_LOG_LEVEL_WARNING = 2

  • static final int enum_LOG_LEVEL_INFO = 3

  • static final int enum_LOG_LEVEL_DEBUG = 4

  • static final int enum_DTMF_MOTHOD_RFC2833 = 0

  • static final int enum_DTMF_MOTHOD_INFO = 1

  • static final int enum_DIRECTION_NONE = 0

  • static final int enum_DIRECTION_SEND_RECV = 1

  • static final int enum_DIRECTION_SEND = 2

  • static final int enum_DIRECTION_RECV = 3

  • static final int enum_RECORD_MODE_NONE = 0

  • static final int enum_RECORD_MODE_RECV = 1

  • static final int enum_RECORD_MODE_SEND = 2

  • static final int enum_RECORD_MODE_BOTH = 3

  • static final int enum_FILE_FORMAT_WAVE = 1

    The record audio file is in WAVE format.

  • static final int enum_FILE_FORMAT_AMR = 2

    The record audio file is in AMR format - all voice data are compressed by AMR codec. Mono.

  • static final int enum_FILE_FORMAT_MP3 = 3 The record audio file is in MP3 format.

  • static final int enum_FILE_FORMAT_MP4 = 4

    The record video file is in MP4(AAC and H264) format. ![ref6]

Member Data Documentation

final int com.portsip.PortSipEnumDefine.enum_VIDEOCODEC_NONE = -1[static]

Used in startRecord only

final int com.portsip.PortSipEnumDefine.enum_VIDEOCODEC_I420 = 133[static]

Used in startRecord only

final int com.portsip.PortSipEnumDefine.enum_DIRECTION_SEND_RECV = 1[static]

both received and sent

final int com.portsip.PortSipEnumDefine.enum_DIRECTION_SEND = 2[static]

Only the sent

final int com.portsip.PortSipEnumDefine.enum_DIRECTION_RECV = 3[static]

Only the received

final int com.portsip.PortSipEnumDefine.enum_RECORD_MODE_NONE = 0[static]

Not Recorded.

final int com.portsip.PortSipEnumDefine.enum_RECORD_MODE_RECV = 1[static]

Only record the received data.

final int com.portsip.PortSipEnumDefine.enum_RECORD_MODE_SEND = 2[static]

Only record the sent data.

final int com.portsip.PortSipEnumDefine.enum_RECORD_MODE_BOTH = 3[static]

Static Public Attributes

  • static final int ECoreErrorNone = 0

  • static final int INVALID_SESSION_ID = -1

  • static final int ECoreAlreadyInitialized = -60000

  • static final int ECoreNotInitialized = -60001

  • static final int ECoreSDKObjectNull = -60002

  • static final int ECoreArgumentNull = -60003

  • static final int ECoreInitializeWinsockFailure = -60004

  • static final int ECoreUserNameAuthNameEmpty = -60005

  • static final int ECoreInitiazeStackFailure = -60006

  • static final int ECorePortOutOfRange = -60007

  • static final int ECoreAddTcpTransportFailure = -60008

  • static final int ECoreAddTlsTransportFailure = -60009

  • static final int ECoreAddUdpTransportFailure = -60010

  • static final int ECoreNotSupportMediaType = -60011

  • static final int ECoreNotSupportDTMFValue = -60012

  • static final int ECoreAlreadyRegistered = -60021

  • static final int ECoreSIPServerEmpty = -60022

  • static final int ECoreExpiresValueTooSmall = -60023

  • static final int ECoreCallIdNotFound = -60024

  • static final int ECoreNotRegistered = -60025

  • static final int ECoreCalleeEmpty = -60026

  • static final int ECoreInvalidUri = -60027

  • static final int ECoreAudioVideoCodecEmpty = -60028

  • static final int ECoreNoFreeDialogSession = -60029

  • static final int ECoreCreateAudioChannelFailed = -60030

  • static final int ECoreSessionTimerValueTooSmall = -60040

  • static final int ECoreAudioHandleNull = -60041

  • static final int ECoreVideoHandleNull = -60042

  • static final int ECoreCallIsClosed = -60043

  • static final int ECoreCallAlreadyHold = -60044

  • static final int ECoreCallNotEstablished = -60045

  • static final int ECoreCallNotHold = -60050

  • static final int ECoreSipMessaegEmpty = -60051

  • static final int ECoreSipHeaderNotExist = -60052

  • static final int ECoreSipHeaderValueEmpty = -60053

  • static final int ECoreSipHeaderBadFormed = -60054

  • static final int ECoreBufferTooSmall = -60055

  • static final int ECoreSipHeaderValueListEmpty = -60056

  • static final int ECoreSipHeaderParserEmpty = -60057

  • static final int ECoreSipHeaderValueListNull = -60058

  • static final int ECoreSipHeaderNameEmpty = -60059

  • static final int ECoreAudioSampleNotmultiple = -60060

  • static final int ECoreAudioSampleOutOfRange = -60061

  • static final int ECoreInviteSessionNotFound = -60062

  • static final int ECoreStackException = -60063

  • static final int ECoreMimeTypeUnknown = -60064

  • static final int ECoreDataSizeTooLarge = -60065

  • static final int ECoreSessionNumsOutOfRange = -60066

  • static final int ECoreNotSupportCallbackMode = -60067

  • static final int ECoreNotFoundSubscribeId = -60068

  • static final int ECoreCodecNotSupport = -60069

  • static final int ECoreCodecParameterNotSupport = -60070

  • static final int ECorePayloadOutofRange = -60071

  • static final int ECorePayloadHasExist = -60072

  • static final int ECoreFixPayloadCantChange = -60073

  • static final int ECoreCodecTypeInvalid = -60074

  • static final int ECoreCodecWasExist = -60075

  • static final int ECorePayloadTypeInvalid = -60076

  • static final int ECoreArgumentTooLong = -60077

  • static final int ECoreMiniRtpPortMustIsEvenNum = -60078

  • static final int ECoreCallInHold = -60079

  • static final int ECoreNotIncomingCall = -60080

  • static final int ECoreCreateMediaEngineFailure = -60081

  • static final int ECoreAudioCodecEmptyButAudioEnabled = -60082

  • static final int ECoreVideoCodecEmptyButVideoEnabled = -60083

  • static final int ECoreNetworkInterfaceUnavailable = -60084

  • static final int ECoreWrongDTMFTone = -60085

  • static final int ECoreWrongLicenseKey = -60086

  • static final int ECoreTrialVersionLicenseKey = -60087

  • static final int ECoreOutgoingAudioMuted = -60088

  • static final int ECoreOutgoingVideoMuted = -60089

  • static final int ECoreFailedCreateSdp = -60090

  • static final int ECoreTrialVersionExpired = -60091

  • static final int ECoreStackFailure = -60092

  • static final int ECoreTransportExists = -60093

  • static final int ECoreUnsupportTransport = -60094

  • static final int ECoreAllowOnlyOneUser = -60095

  • static final int ECoreUserNotFound = -60096

  • static final int ECoreTransportsIncorrect = -60097

  • static final int ECoreCreateTransportFailure = -60098

  • static final int ECoreTransportNotSet = -60099

  • static final int ECoreECreateSignalingFailure = -60100

  • static final int ECoreArgumentIncorrect = -60101

  • static final int ECoreIVRObjectNull = -61001

  • static final int ECoreIVRIndexOutOfRange = -61002

  • static final int ECoreIVRReferFailure = -61003

  • static final int ECoreIVRWaitingTimeOut = -61004

  • static final int EAudioFileNameEmpty = -70000

  • static final int EAudioChannelNotFound = -70001

  • static final int EAudioStartRecordFailure = -70002

  • static final int EAudioRegisterRecodingFailure = -70003

  • static final int EAudioRegisterPlaybackFailure = -70004

  • static final int EAudioGetStatisticsFailure = -70005

  • static final int EAudioPlayFileAlreadyEnable = -70006

  • static final int EAudioPlayObjectNotExist = -70007

  • static final int EAudioPlaySteamNotEnabled = -70008

  • static final int EAudioRegisterCallbackFailure = -70009

  • static final int EAudioCreateAudioConferenceFailure = -70010

  • static final int EAudioOpenPlayFileFailure = -70011

  • static final int EAudioPlayFileModeNotSupport = -70012

  • static final int EAudioPlayFileFormatNotSupport = -70013

  • static final int EAudioPlaySteamAlreadyEnabled = -70014

  • static final int EAudioCreateRecordFileFailure = -70015

  • static final int EAudioCodecNotSupport = -70016

  • static final int EAudioPlayFileNotEnabled = -70017

  • static final int EAudioPlayFileUnknowSeekOrigin = -70018

  • static final int EAudioCantSetDeviceIdDuringCall =-70019

  • static final int EAudioVolumeOutOfRange =-70020

  • static final int EVideoFileNameEmpty = -80000

  • static final int EVideoGetDeviceNameFailure = -80001

  • static final int EVideoGetDeviceIdFailure = -80002

  • static final int EVideoStartCaptureFailure = -80003

  • static final int EVideoChannelNotFound = -80004

  • static final int EVideoStartSendFailure = -80005

  • static final int EVideoGetStatisticsFailure = -80006

  • static final int EVideoStartPlayAviFailure = -80007

  • static final int EVideoSendAviFileFailure = -80008

  • static final int EVideoRecordUnknowCodec = -80009

  • static final int EVideoCantSetDeviceIdDuringCall = -80010

  • static final int EVideoUnsupportCaptureRotate = -80011

  • static final int VideoUnsupportCaptureResolution = -80012

  • static final int ECameraSwitchTooOften = -80013

  • static final int EMTUOutOfRange = -80014

  • static final int EDeviceGetDeviceNameFailure = -90001

Last updated