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

Functions

Int32 PortSIP.SIPCallbackEvents.onInviteIncoming (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String callerDisplayName, String caller, String calleeDisplayName, String callee, String audioCodecNames, String videoCodecNames, Boolean existsAudio, Boolean existsVideo, StringBuilder sipMessage)
 
Int32 PortSIP.SIPCallbackEvents.onInviteTrying (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId)
 
Int32 PortSIP.SIPCallbackEvents.onInviteSessionProgress (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String audioCodecNames, String videoCodecNames, Boolean existsEarlyMedia, Boolean existsAudio, Boolean existsVideo, StringBuilder sipMessage)
 
Int32 PortSIP.SIPCallbackEvents.onInviteRinging (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String statusText, Int32 statusCode, StringBuilder sipMessage)
 
Int32 PortSIP.SIPCallbackEvents.onInviteAnswered (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String callerDisplayName, String caller, String calleeDisplayName, String callee, String audioCodecNames, String videoCodecNames, Boolean existsAudio, Boolean existsVideo, StringBuilder sipMessage)
 
Int32 PortSIP.SIPCallbackEvents.onInviteFailure (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String reason, Int32 code, StringBuilder sipMessage)
 
Int32 PortSIP.SIPCallbackEvents.onInviteUpdated (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String audioCodecNames, String videoCodecNames, Boolean existsAudio, Boolean existsVideo, StringBuilder sipMessage)
 
Int32 PortSIP.SIPCallbackEvents.onInviteConnected (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId)
 
Int32 PortSIP.SIPCallbackEvents.onInviteBeginingForward (Int32 callbackIndex, Int32 callbackObject, String forwardTo)
 
Int32 PortSIP.SIPCallbackEvents.onInviteClosed (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId)
 
Int32 PortSIP.SIPCallbackEvents.onDialogStateUpdated (Int32 callbackIndex, Int32 callbackObject, String BLFMonitoredUri, String BLFDialogState, String BLFDialogId, String BLFDialogDirection)
 
Int32 PortSIP.SIPCallbackEvents.onRemoteHold (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId)
 
Int32 PortSIP.SIPCallbackEvents.onRemoteUnHold (Int32 callbackIndex, Int32 callbackObject, Int32 sessionId, String audioCodecNames, String videoCodecNames, Boolean existsAudio, Boolean existsVideo)
 

Detailed Description

Function Documentation

◆ onInviteIncoming()

Int32 PortSIP.SIPCallbackEvents.onInviteIncoming ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  callerDisplayName,
String  caller,
String  calleeDisplayName,
String  callee,
String  audioCodecNames,
String  videoCodecNames,
Boolean  existsAudio,
Boolean  existsVideo,
StringBuilder  sipMessage 
)

When the 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.
audioCodecNamesThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecNamesThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioIf it's true, it indicates that this call includes the audio.
existsVideoIf it's true, it indicates that this call includes the video.
sipMessageThe SIP message received.

◆ onInviteTrying()

Int32 PortSIP.SIPCallbackEvents.onInviteTrying ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId 
)

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

Parameters
sessionIdThe session ID of the call.

◆ onInviteSessionProgress()

Int32 PortSIP.SIPCallbackEvents.onInviteSessionProgress ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  audioCodecNames,
String  videoCodecNames,
Boolean  existsEarlyMedia,
Boolean  existsAudio,
Boolean  existsVideo,
StringBuilder  sipMessage 
)

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

Parameters
sessionIdThe session ID of the call.
audioCodecNamesThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecNamesThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsEarlyMediaIf it's true, it indicates that the call has early media.
existsAudioIf it's true, it indicates that this call includes the audio.
existsVideoIf it's true, it indicates that this call includes the video.
sipMessageThe SIP message received.

◆ onInviteRinging()

Int32 PortSIP.SIPCallbackEvents.onInviteRinging ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  statusText,
Int32  statusCode,
StringBuilder  sipMessage 
)

If the outgoing call was ringing, this event would be triggered.

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

◆ onInviteAnswered()

Int32 PortSIP.SIPCallbackEvents.onInviteAnswered ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  callerDisplayName,
String  caller,
String  calleeDisplayName,
String  callee,
String  audioCodecNames,
String  videoCodecNames,
Boolean  existsAudio,
Boolean  existsVideo,
StringBuilder  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.
audioCodecNamesThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecNamesThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioIf it's true, it indicates that this call includes the audio.
existsVideoIf it's true, it indicates that this call includes the video.
sipMessageThe SIP message received.

◆ onInviteFailure()

Int32 PortSIP.SIPCallbackEvents.onInviteFailure ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  reason,
Int32  code,
StringBuilder  sipMessage 
)

If the outgoing call fails, this event will be triggered.

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

◆ onInviteUpdated()

Int32 PortSIP.SIPCallbackEvents.onInviteUpdated ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  audioCodecNames,
String  videoCodecNames,
Boolean  existsAudio,
Boolean  existsVideo,
StringBuilder  sipMessage 
)

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

Parameters
sessionIdThe session ID of the call.
audioCodecNamesThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecNamesThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioIf it's true, it indicates that this call includes the audio.
existsVideoIf it's true, it indicates that this call includes the video.
sipMessageThe SIP message received.

◆ onInviteConnected()

Int32 PortSIP.SIPCallbackEvents.onInviteConnected ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId 
)

This event would 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 these functions will return error.

Parameters
sessionIdThe session ID of the call.

◆ onInviteBeginingForward()

Int32 PortSIP.SIPCallbackEvents.onInviteBeginingForward ( Int32  callbackIndex,
Int32  callbackObject,
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 forwarding target SIP URI.

◆ onInviteClosed()

Int32 PortSIP.SIPCallbackEvents.onInviteClosed ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId 
)

This event is triggered once remote side closes the call.

Parameters
sessionIdThe session ID of the call.

◆ onDialogStateUpdated()

Int32 PortSIP.SIPCallbackEvents.onDialogStateUpdated ( Int32  callbackIndex,
Int32  callbackObject,
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 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()

Int32 PortSIP.SIPCallbackEvents.onRemoteHold ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId 
)

If the remote side placed the call on hold, this event would be triggered.

Parameters
sessionIdThe session ID of the call.

◆ onRemoteUnHold()

Int32 PortSIP.SIPCallbackEvents.onRemoteUnHold ( Int32  callbackIndex,
Int32  callbackObject,
Int32  sessionId,
String  audioCodecNames,
String  videoCodecNames,
Boolean  existsAudio,
Boolean  existsVideo 
)

If the remote side un-hold the call, this event would be triggered.

Parameters
sessionIdThe session ID of the call.
audioCodecNamesThe matched audio codecs. It's separated by "#" if there are more than one codecs.
videoCodecNamesThe matched video codecs. It's separated by "#" if there are more than one codecs.
existsAudioIf it's true, it indicates that this call includes the audio.
existsVideoIf it's true, it indicates that this call includes the video.