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
Record functions

Functions

int com.portsip.PortSipSdk.startRecord (long sessionId, String recordFilePath, String recordFileName, boolean appendTimeStamp, int enum_audioFileFormat, int enum_audioRecordMode, int enum_videocodec, int enum_videoRecordMode)
 
int com.portsip.PortSipSdk.stopRecord (long sessionId)
 

Detailed Description

Function Documentation

◆ startRecord()

int com.portsip.PortSipSdk.startRecord ( long  sessionId,
String  recordFilePath,
String  recordFileName,
boolean  appendTimeStamp,
int  enum_audioFileFormat,
int  enum_audioRecordMode,
int  enum_videocodec,
int  enum_videoRecordMode 
)

Start recording the call.

Parameters
sessionIdThe session ID of call conversation.
recordFilePathThe file path to save record file. It must be existent.
recordFileNameThe file name of record file. For example audiorecord.wav or videorecord.avi.
appendTimeStampSet to true to append the timestamp to the name of the recording file.
enum_audioFileFormatThe audio record file format, allow below values:
FILEFORMAT_WAVE = 1, ///< The record audio file is WAVE format.
FILEFORMAT_AMR, ///< The record audio file is in AMR format with all voice data compressed by AMR codec.
enum_audioRecordModeThe audio record mode, allow below values:
RECORD_NONE = 0, ///< Not Record.
RECORD_RECV = 1, ///< Only record the received data.
RECORD_SEND, ///< Only record send data.
RECORD_BOTH ///< The record audio file is WAVE format.
enum_videocodecThe codec used for compressing the video data to save into video record file.
enum_videoRecordModeAllow to set video record mode. Support to record received and/or sent video.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopRecord()

int com.portsip.PortSipSdk.stopRecord ( long  sessionId)

Stop recording.

Parameters
sessionIdThe session ID of call conversation.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.