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

Functions

void com.portsip.OnPortSIPEvent.onInviteIncoming (long sessionId, String callerDisplayName, String caller, String calleeDisplayName, String callee, String audioCodecs, String videoCodecs, boolean existsAudio, boolean existsVideo, String sipMessage)
 
void com.portsip.OnPortSIPEvent.onInviteTrying (long sessionId)
 
void com.portsip.OnPortSIPEvent.onInviteSessionProgress (long sessionId, String audioCodecs, String videoCodecs, boolean existsEarlyMedia, boolean existsAudio, boolean existsVideo, String sipMessage)
 
void com.portsip.OnPortSIPEvent.onInviteRinging (long sessionId, String statusText, int statusCode, String sipMessage)
 
void com.portsip.OnPortSIPEvent.onInviteAnswered (long sessionId, String callerDisplayName, String caller, String calleeDisplayName, String callee, String audioCodecs, String videoCodecs, boolean existsAudio, boolean existsVideo, String sipMessage)
 
void com.portsip.OnPortSIPEvent.onInviteFailure (long sessionId, String reason, int code, String sipMessage)
 
void com.portsip.OnPortSIPEvent.onInviteUpdated (long sessionId, String audioCodecs, String videoCodecs, boolean existsAudio, boolean existsVideo, String sipMessage)
 
void com.portsip.OnPortSIPEvent.onInviteConnected (long sessionId)
 
void com.portsip.OnPortSIPEvent.onInviteBeginingForward (String forwardTo)
 
void com.portsip.OnPortSIPEvent.onInviteClosed (long sessionId)
 
void com.portsip.OnPortSIPEvent.onDialogStateUpdated (String BLFMonitoredUri, String BLFDialogState, String BLFDialogId, String BLFDialogDirection)
 
void com.portsip.OnPortSIPEvent.onRemoteHold (long sessionId)
 
void com.portsip.OnPortSIPEvent.onRemoteUnHold (long sessionId, String audioCodecs, String videoCodecs, boolean existsAudio, boolean existsVideo)
 

Detailed Description

Function Documentation

◆ onInviteIncoming()

void com.portsip.OnPortSIPEvent.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
sessionIdThe session ID of the call.
callerDisplayNameThe display name of caller
callerThe caller.
calleeDisplayNameThe display name of callee.
calleeThe callee.
audioCodecsThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecsThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioBy setting to true, it means that this call include the audio.
existsVideoBy setting to true, it means that this call include the video.
sipMessageThe SIP message received.

◆ onInviteTrying()

void com.portsip.OnPortSIPEvent.onInviteTrying ( long  sessionId)

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

Parameters
sessionIdThe session ID of the call.

◆ onInviteSessionProgress()

void com.portsip.OnPortSIPEvent.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
sessionIdThe session ID of the call.
audioCodecsThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecsThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsEarlyMediaBy setting to true it means the call has early media.
existsAudioBy setting to true it means this call include the audio.
existsVideoBy setting to true it means this call include the video.
sipMessageThe SIP message received.

◆ onInviteRinging()

void com.portsip.OnPortSIPEvent.onInviteRinging ( long  sessionId,
String  statusText,
int  statusCode,
String  sipMessage 
)

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

Parameters
sessionIdThe session ID of the call.
statusTextThe status text.
statusCodeThe status code.
sipMessageThe SIP message received.

◆ onInviteAnswered()

void com.portsip.OnPortSIPEvent.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
sessionIdThe session ID of the call.
callerDisplayNameThe display name of caller
callerThe caller.
calleeDisplayNameThe display name of callee.
calleeThe callee.
audioCodecsThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecsThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioBy setting to true, this call includes the audio.
existsVideoBy setting to true, this call includes the video.
sipMessageThe SIP message received.

◆ onInviteFailure()

void com.portsip.OnPortSIPEvent.onInviteFailure ( long  sessionId,
String  reason,
int  code,
String  sipMessage 
)

This event will be triggered if the outgoing call fails.

Parameters
sessionIdThe session ID of the call.
reasonThe failure reason.
codeThe failure code.
sipMessageThe SIP message received.

◆ onInviteUpdated()

void com.portsip.OnPortSIPEvent.onInviteUpdated ( long  sessionId,
String  audioCodecs,
String  videoCodecs,
boolean  existsAudio,
boolean  existsVideo,
String  sipMessage 
)

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

Parameters
sessionIdThe session ID of the call.
audioCodecsThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecsThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioBy setting to true, this call includes the audio.
existsVideoBy setting to true, this call includes the video.
sipMessageThe SIP message received.

◆ onInviteConnected()

void com.portsip.OnPortSIPEvent.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
sessionIdThe session ID of the call.

◆ onInviteBeginingForward()

void com.portsip.OnPortSIPEvent.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
forwardToThe target SIP URI of the call forwarding.

◆ onInviteClosed()

void com.portsip.OnPortSIPEvent.onInviteClosed ( long  sessionId)

This event is triggered once remote side ends the call.

Parameters
sessionIdThe session ID of the call.

◆ onDialogStateUpdated()

void com.portsip.OnPortSIPEvent.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
BLFMonitoredUrithe monitored user's URI
BLFDialogState- the status of the call
BLFDialogId- the id of the call
BLFDialogDirection- the direction of the call

◆ onRemoteHold()

void com.portsip.OnPortSIPEvent.onRemoteHold ( long  sessionId)

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

Parameters
sessionIdThe session ID of the call.

◆ onRemoteUnHold()

void com.portsip.OnPortSIPEvent.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
sessionIdThe session ID of the call.
audioCodecsThe matched audio codecs. It's separated by "#" if there are more than one codec.
videoCodecsThe matched video codecs. It's separated by "#" if there are more than one codec.
existsAudioBy setting to true, this call includes the audio.
existsVideoBy setting to true, this call includes the video.