![]() |
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.
|
PortSIP VoIP SDK functions class. More...
#import <PortSIPSDK.h>
Inherits NSObject.
Instance Methods | |
(int) | - initialize:localIP:localSIPPort:loglevel:logPath:maxLine:agent:audioDeviceLayer:videoDeviceLayer:TLSCertificatesRootPath:TLSCipherList:verifyTLSCertificate: |
Initialize the SDK. More... | |
(int) | - setInstanceId: |
Set the instance Id, the outbound instanceId((RFC5626) ) used in contact headers. More... | |
(void) | - unInitialize |
Un-initialize the SDK and release resources. | |
(int) | - setUser:displayName:authName:password:userDomain:SIPServer:SIPServerPort:STUNServer:STUNServerPort:outboundServer:outboundServerPort: |
Set user account info. More... | |
(void) | - removeUser |
Remove user account info. | |
(int) | - registerServer:retryTimes: |
Register to SIP proxy server (login to server) More... | |
(int) | - refreshRegistration: |
Refresh the registration manually after successfully registered. More... | |
(int) | - unRegisterServer |
Un-register from the SIP proxy server. More... | |
(int) | - setLicenseKey: |
Set the license key. It must be called before setUser function. More... | |
(int) | - getNICNums |
Get the Network Interface Card numbers. More... | |
(NSString *) | - getLocalIpAddress: |
Get the local IP address by Network Interface Card index. More... | |
(int) | - addAudioCodec: |
Enable an audio codec. It will appear in SDP. More... | |
(int) | - addVideoCodec: |
Enable a video codec. It will appear in SDP. More... | |
(BOOL) | - isAudioCodecEmpty |
Detect if the enabled audio codecs is empty. More... | |
(BOOL) | - isVideoCodecEmpty |
Detect if enabled video codecs is empty or not. More... | |
(int) | - setAudioCodecPayloadType:payloadType: |
Set the RTP payload type for dynamic audio codec. More... | |
(int) | - setVideoCodecPayloadType:payloadType: |
Set the RTP payload type for dynamic Video codec. More... | |
(void) | - clearAudioCodec |
Remove all enabled audio codecs. | |
(void) | - clearVideoCodec |
Remove all enabled video codecs. | |
(int) | - setAudioCodecParameter:parameter: |
Set the codec parameter for audio codec. More... | |
(int) | - setVideoCodecParameter:parameter: |
Set the codec parameter for video codec. More... | |
(NSString *) | - getVersion |
Get the current version number of the SDK. More... | |
(int) | - enableRport: |
Enable/disable rport(RFC3581). More... | |
(int) | - enableEarlyMedia: |
Enable/disable Early Media. More... | |
(int) | - enableReliableProvisional: |
Enable/disable PRACK. More... | |
(int) | - enable3GppTags: |
Enable/disable the 3Gpp tags, including "ims.icsi.mmtel" and "g.3gpp.smsip". More... | |
(void) | - enableCallbackSendingSignaling: |
Enable/disable to callback the sent SIP messages. More... | |
(int) | - setSrtpPolicy: |
Set the SRTP policy. More... | |
(int) | - setRtpPortRange:maximumRtpAudioPort:minimumRtpVideoPort:maximumRtpVideoPort: |
Set the RTP ports range for audio and video streaming. More... | |
(int) | - setRtcpPortRange:maximumRtcpAudioPort:minimumRtcpVideoPort:maximumRtcpVideoPort: |
Set the RTCP ports range for audio and video streaming. More... | |
(int) | - enableCallForward:forwardTo: |
Enable call forwarding. More... | |
(int) | - disableCallForward |
Disable the call forwarding. The SDK is not forwarding any incoming calls once this function is called. More... | |
(int) | - enableSessionTimer:refreshMode: |
Allows to periodically refresh Session Initiation Protocol (SIP) sessions by sending INVITE requests repeatedly. More... | |
(int) | - disableSessionTimer |
Disable the session timer. More... | |
(void) | - setDoNotDisturb: |
Enable the "Do not disturb" to enable/disable. More... | |
(void) | - enableAutoCheckMwi: |
Enable the CheckMwi to enable/disable. More... | |
(int) | - setRtpKeepAlive:keepAlivePayloadType:deltaTransmitTimeMS: |
Enable or disable to send RTP keep-alive packet when the call is established. More... | |
(int) | - setKeepAliveTime: |
Enable or disable to send SIP keep-alive packet. More... | |
(int) | - setAudioSamples:maxPtime: |
Set the audio capturing sample. More... | |
(int) | - addSupportedMimeType:mimeType:subMimeType: |
Set the SDK to receive the SIP message that includes special mime type. More... | |
(NSString *) | - getSipMessageHeaderValue:headerName: |
Access the SIP header of SIP message. More... | |
(long) | - addSipMessageHeader:methodName:msgType:headerName:headerValue: |
Add the SIP Message header into the specified outgoing SIP message. More... | |
(int) | - removeAddedSipMessageHeader: |
Remove the headers (custom header) added by addSipMessageHeader. More... | |
(void) | - clearAddedSipMessageHeaders |
Clear the added extension headers (custom headers) More... | |
(long) | - modifySipMessageHeader:methodName:msgType:headerName:headerValue: |
Modify the special SIP header value for every outgoing SIP message. More... | |
(int) | - removeModifiedSipMessageHeader: |
Remove the extension header (custom header) from every outgoing SIP message. More... | |
(void) | - clearModifiedSipMessageHeaders |
Clear the modified headers value, and do not modify every outgoing SIP message header values any longer. More... | |
(int) | - setVideoDeviceId: |
Set the video device that will be used for video call. More... | |
(int) | - setVideoResolution:height: |
Set the video capturing resolution. More... | |
(int) | - setAudioBitrate:codecType:bitrateKbps: |
Set the audio bit rate. More... | |
(int) | - setVideoBitrate:bitrateKbps: |
Set the video bitrate. More... | |
(int) | - setVideoFrameRate:frameRate: |
Set the video frame rate. More... | |
(int) | - sendVideo:sendState: |
Send the video to remote side. More... | |
(void) | - setLocalVideoWindow: |
Set the window on which the local video image will be displayed. More... | |
(int) | - setRemoteVideoWindow:remoteVideoWindow: |
Set the window for a session to display the received remote video image. More... | |
(int) | - displayLocalVideo: |
Start/stop displaying the local video image. More... | |
(int) | - setVideoNackStatus: |
Enable/disable the NACK feature (RFC4585) to help to improve the video quality. More... | |
(int) | - setLoudspeakerStatus: |
Set the audio device that will be used for audio call. More... | |
(int) | - setChannelOutputVolumeScaling:scaling: |
(long) | - call:sendSdp:videoCall: |
Make a call. More... | |
(int) | - rejectCall:code: |
rejectCall Reject the incoming call. More... | |
(int) | - hangUp: |
hangUp Hang up the call. More... | |
(int) | - answerCall:videoCall: |
answerCall Answer the incoming call. More... | |
(int) | - updateCall:enableAudio:enableVideo: |
Use the re-INVITE to update the established call. More... | |
(int) | - hold: |
Place a call on hold. More... | |
(int) | - unHold: |
Take off hold. More... | |
(int) | - muteSession:muteIncomingAudio:muteOutgoingAudio:muteIncomingVideo:muteOutgoingVideo: |
Mute the specified session audio or video. More... | |
(int) | - forwardCall:forwardTo: |
Forward the call to another user once received an incoming call. More... | |
(long) | - pickupBLFCall:videoCall: |
This function will be used for picking up a call based on the BLF (Busy Lamp Field) status. More... | |
(int) | - sendDtmf:dtmfMethod:code:dtmfDration:playDtmfTone: |
Send DTMF tone. More... | |
(int) | - refer:referTo: |
Refer the current call to another one. More... | |
(int) | - attendedRefer:replaceSessionId:referTo: |
Make an attended refer. More... | |
(int) | - attendedRefer2:replaceSessionId:replaceMethod:target:referTo: |
Make an attended refer with specified request line and specified method embedded into the "Refer-To" header. More... | |
(int) | - outOfDialogRefer:replaceMethod:target:referTo: |
Send an out of dialog REFER to replace the specified call. More... | |
(long) | - acceptRefer:referSignaling: |
Once the REFER request accepted, a new call will be made if called this function. The function is usually called after onReceivedRefer callback event. More... | |
(int) | - rejectRefer: |
Reject the REFER request. More... | |
(int) | - enableSendPcmStreamToRemote:state:streamSamplesPerSec: |
Enable the SDK to send PCM stream data to remote side from another source instead of microphone. More... | |
(int) | - sendPcmStreamToRemote:data: |
Send the audio stream in PCM format from another source instead of audio device capturing (microphone). More... | |
(int) | - enableSendVideoStreamToRemote:state: |
Enable the SDK to send video stream data to remote side from another source instead of camera. More... | |
(int) | - sendVideoStreamToRemote:data:width:height: |
Send the video stream to remote side. More... | |
(int) | - setRtpCallback: |
Set the RTP callbacks to allow to access the sent and received RTP packets. More... | |
(int) | - enableAudioStreamCallback:enable:callbackMode: |
Enable/disable the audio stream callback. More... | |
(int) | - enableVideoStreamCallback:callbackMode: |
Enable/disable the video stream callback. More... | |
(int) | - startRecord:recordFilePath:recordFileName:appendTimeStamp:audioFileFormat:audioRecordMode:aviFileCodecType:videoRecordMode: |
Start recording the call. More... | |
(int) | - stopRecord: |
Stop recording. More... | |
(int) | - playVideoFileToRemote:aviFile:loop:playAudio: |
Play an AVI file to remote party. More... | |
(int) | - stopPlayVideoFileToRemote: |
Stop playing video file to remote party. More... | |
(int) | - playAudioFileToRemote:filename:fileSamplesPerSec:loop: |
Play a wave file to remote party. More... | |
(int) | - stopPlayAudioFileToRemote: |
Stop playing wave file to remote party. More... | |
(int) | - playAudioFileToRemoteAsBackground:filename:fileSamplesPerSec: |
Play a wave file to remote party as conversation background sound. More... | |
(int) | - stopPlayAudioFileToRemoteAsBackground: |
Stop playing a wave file to remote party as conversation background sound. More... | |
(void) | - audioPlayLoopbackTest: |
Used for the loop back testing against audio device. More... | |
(int) | - createAudioConference |
Create an audio conference. More... | |
(int) | - createVideoConference:videoWidth:videoHeight:displayLocalVideo: |
Create a video conference. More... | |
(void) | - destroyConference |
Destroy the existent conference. | |
(int) | - setConferenceVideoWindow: |
Set the window for a conference that is used to display the received remote video image. More... | |
(int) | - joinToConference: |
Join a session into existent conference. If the call is in hold, please un-hold first. More... | |
(int) | - removeFromConference: |
Remove a session from an existent conference. More... | |
(int) | - setAudioRtcpBandwidth:BitsRR:BitsRS:KBitsAS: |
Set the audio RTCP bandwidth parameters as the RFC3556. More... | |
(int) | - setVideoRtcpBandwidth:BitsRR:BitsRS:KBitsAS: |
Set the video RTCP bandwidth parameters as the RFC3556. More... | |
(int) | - enableAudioQos: |
Set the DSCP (differentiated services code point) value of QoS (Quality of Service) for audio channel. More... | |
(int) | - enableVideoQos: |
Set the DSCP (differentiated services code point) value of QoS (Quality of Service) for video channel. More... | |
(int) | - setVideoMTU: |
Set the MTU size for video RTP packet. More... | |
(int) | - getAudioStatistics:sendBytes:sendPackets:sendPacketsLost:sendFractionLost:sendRttMS:sendCodecType:sendJitterMS:sendAudioLevel:recvBytes:recvPackets:recvPacketsLost:recvFractionLost:recvCodecType:recvJitterMS:recvAudioLevel: |
Obtain the statistics of audio channel. More... | |
(int) | - getVideoStatistics:sendBytes:sendPackets:sendPacketsLost:sendFractionLost:sendRttMS:sendCodecType:sendFrameWidth:sendFrameHeight:sendBitrateBPS:sendFramerate:recvBytes:recvPackets:recvPacketsLost:recvFractionLost:recvCodecType:recvFrameWidth:recvFrameHeight:recvBitrateBPS:recvFramerate: |
Obtain the statistics of video channel. More... | |
(void) | - enableVAD: |
Enable/disable Voice Activity Detection (VAD). More... | |
(void) | - enableCNG: |
Enable/disable Comfort Noise Generator (CNG). More... | |
(int) | - sendOptions:sdp: |
Send OPTIONS message. More... | |
(int) | - sendInfo:mimeType:subMimeType:infoContents: |
Send an INFO message to remote side in dialog. More... | |
(long) | - sendMessage:mimeType:subMimeType:message:messageLength: |
Send a MESSAGE message to remote side in dialog. More... | |
(long) | - sendOutOfDialogMessage:mimeType:subMimeType:isSMS:message:messageLength: |
Send an out of dialog MESSAGE message to remote side. More... | |
(int) | - setPresenceMode: |
Indicate that SDK uses the P2P mode for presence or presence agent mode. More... | |
(int) | - setDefaultSubscriptionTime: |
Set the default expiration time to be used when creating a subscription. More... | |
(int) | - setDefaultPublicationTime: |
Set the default expiration time to be used when creating a publication. More... | |
(long) | - presenceSubscribe:subject: |
Send a SUBSCRIBE message for subscribing the contact's presence status. More... | |
(int) | - presenceTerminateSubscribe: |
Terminate the given presence subscription. More... | |
(int) | - presenceAcceptSubscribe: |
Accept the presence SUBSCRIBE request which is received from contact. More... | |
(int) | - presenceRejectSubscribe: |
Reject a presence SUBSCRIBE request which is received from contact. More... | |
(int) | - setPresenceStatus:statusText: |
Send a NOTIFY message to contact to notify that presence status is online/offline/changed. More... | |
(long) | - sendSubscription:eventName: |
Send a SUBSCRIBE message to remote side. More... | |
(int) | - terminateSubscription: |
Terminate the given subscription. More... | |
(BOOL) | - startKeepAwake |
Keep VoIP awake in the background. If you want your application to be able to receive the incoming call while it's running in background, you should call this function in applicationDidEnterBackground. More... | |
(BOOL) | - stopKeepAwake |
Keep VoIP awake in the background. Call this function in applicationWillEnterForeground once your application comes back to foreground. More... | |
(BOOL) | - startAudio |
Start Audio Device. Call it as AVAudioSessionInterruptionTypeEnded. More... | |
(BOOL) | - stopAudio |
Stop Audio Device. Call it as AVAudioSessionInterruptionTypeBegan. More... | |
(int) | - enableCallKit: |
Enable/disable CallKit(Native Integration). More... | |
Properties | |
id< PortSIPEventDelegate > | delegate |
PortSIP VoIP SDK functions class.
PortSIP SDK functions class description.