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
RTP callback events

Functions

Int32 PortSIP.SIPCallbackEvents.onReceivedRtpPacket (IntPtr callbackObject, Int32 sessionId, Boolean isAudio, byte[] RTPPacket, Int32 packetSize)
 
Int32 PortSIP.SIPCallbackEvents.onSendingRtpPacket (IntPtr callbackObject, Int32 sessionId, Boolean isAudio, byte[] RTPPacket, Int32 packetSize)
 

Detailed Description

Function Documentation

◆ onReceivedRtpPacket()

Int32 PortSIP.SIPCallbackEvents.onReceivedRtpPacket ( IntPtr  callbackObject,
Int32  sessionId,
Boolean  isAudio,
byte []  RTPPacket,
Int32  packetSize 
)

If setRTPCallback function is called to enable the RTP callback, this event will be triggered once receiving a RTP packet.

Parameters
sessionIdThe session ID of the call.
isAudioIf the received RTP packet is of audio, this parameter returns true, otherwise false.
RTPPacketThe memory of whole RTP packet.
packetSizeThe size of received RTP Packet.
Note
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.

◆ onSendingRtpPacket()

Int32 PortSIP.SIPCallbackEvents.onSendingRtpPacket ( IntPtr  callbackObject,
Int32  sessionId,
Boolean  isAudio,
byte []  RTPPacket,
Int32  packetSize 
)

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

Parameters
sessionIdThe session ID of the call.
isAudioIf the received RTP packet is of audio, this parameter returns true, otherwise false.
RTPPacketThe memory of whole RTP packet.
packetSizeThe size of received RTP Packet.
Note
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.