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
Play audio and video file to remote functions

Functions

Int32 PortSIP.PortSIPLib.playVideoFileToRemote (Int32 sessionId, String fileName, Boolean loop, Boolean playAudio)
 Play an AVI file to remote party. More...
 
Int32 PortSIP.PortSIPLib.stopPlayVideoFileToRemote (Int32 sessionId)
 Stop playing video file to remote side. More...
 
Int32 PortSIP.PortSIPLib.playAudioFileToRemote (Int32 sessionId, String fileName, Int32 fileSamplesPerSec, Boolean loop)
 Play a wave file to remote party. More...
 
Int32 PortSIP.PortSIPLib.stopPlayAudioFileToRemote (Int32 sessionId)
 Stop playing wave file to remote side. More...
 
Int32 PortSIP.PortSIPLib.playAudioFileToRemoteAsBackground (Int32 sessionId, String fileName, Int32 fileSamplesPerSec)
 Play a wave file to remote party as conversation background sound. More...
 
Int32 PortSIP.PortSIPLib.stopPlayAudioFileToRemoteAsBackground (Int32 sessionId)
 Stop playing wave file to remote party as conversation background sound. More...
 

Detailed Description

Function Documentation

◆ playVideoFileToRemote()

Int32 PortSIP.PortSIPLib.playVideoFileToRemote ( Int32  sessionId,
String  fileName,
Boolean  loop,
Boolean  playAudio 
)

Play an AVI file to remote party.

Parameters
sessionIdSession ID of the call.
fileNameThe full file path, such as "c:\\test.avi".
loopSet to false to stop playing video file when it is ended, or true to play it repeatedly.
playAudioIf it's set to true, audio and video will be played together; if false, only video will be played.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopPlayVideoFileToRemote()

Int32 PortSIP.PortSIPLib.stopPlayVideoFileToRemote ( Int32  sessionId)

Stop playing video file to remote side.

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

◆ playAudioFileToRemote()

Int32 PortSIP.PortSIPLib.playAudioFileToRemote ( Int32  sessionId,
String  fileName,
Int32  fileSamplesPerSec,
Boolean  loop 
)

Play a wave file to remote party.

Parameters
sessionIdSession ID of the call.
fileNameThe full filepath, such as "c:\\test.wav".
fileSamplesPerSecThe wave file sample in seconds. It should be 8000, 16000 or 32000.
loopSet to false to stop playing audio file when it is ended, or true to play it repeatedly.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopPlayAudioFileToRemote()

Int32 PortSIP.PortSIPLib.stopPlayAudioFileToRemote ( Int32  sessionId)

Stop playing wave file to remote side.

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

◆ playAudioFileToRemoteAsBackground()

Int32 PortSIP.PortSIPLib.playAudioFileToRemoteAsBackground ( Int32  sessionId,
String  fileName,
Int32  fileSamplesPerSec 
)

Play a wave file to remote party as conversation background sound.

Parameters
sessionIdSession ID of the call.
fileNameThe full filepath, such as "c:\\test.wav".
fileSamplesPerSecThe wave file sample in seconds. It should be 8000, 16000 or 32000.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopPlayAudioFileToRemoteAsBackground()

Int32 PortSIP.PortSIPLib.stopPlayAudioFileToRemoteAsBackground ( Int32  sessionId)

Stop playing wave file to remote party as conversation background sound.

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