PortSIP VoIP SDK Manual for iOS  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

(void) - <PortSIPEventDelegate >::onReceivedRTPPacket:isAudio:RTPPacket:packetSize:
 
(void) - <PortSIPEventDelegate >::onSendingRTPPacket:isAudio:RTPPacket:packetSize:
 

Detailed Description

Function Documentation

◆ onReceivedRTPPacket:isAudio:RTPPacket:packetSize:()

- (void PortSIPEventDelegate) onReceivedRTPPacket: (long)  sessionId
isAudio: (BOOL)  isAudio
RTPPacket: (unsigned char *)  RTPPacket
packetSize: (int)  packetSize 

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

Parameters
sessionIdThe session ID of the call.
isAudioIf the received RTP packet is of audio, this parameter is 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:isAudio:RTPPacket:packetSize:()

- (void PortSIPEventDelegate) onSendingRTPPacket: (long)  sessionId
isAudio: (BOOL)  isAudio
RTPPacket: (unsigned char *)  RTPPacket
packetSize: (int)  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.