VoxImplant

Main VoxImplant SDK class. Should not be instantiated directly, use getInstance instead.

Warning: Deprecated. Use VIClient, VICall instead.

Members
Other Methods
voxDelegate

Set delegate object for SDK

Warning: Deprecated. Use VIClientSessionDelegate delegate to handle connection to VoxImplant Cloud events, VICallDelegate delegate to handle call events and VIClientCallManagerDelegate delegate to handle incoming calls.

@property (nonatomic, weak) id<VoxImplantDelegate> voxDelegate
–  getVoxDelegate

Returns current delegate

Warning: Deprecated. Use [VIClient sessionDelegate] to get connection delegate, [VIClient callManagerDelegate] to get incoming call delegate instead.

- (id<VoxImplantDelegate>)getVoxDelegate
Return

Previously set VoxImplantDelegate delegate

+  setLogLevel:

Sets a verbosity level for log messages. Note that this method must be called before creating SDK object instance.

Warning: Deprecated. Use [VIClient setLogLevel:] instead.

+ (void)setLogLevel:(enum VoxImplantLogLevel)logLevel
Parameters
logLevel

Log verbosity level

+  saveLogToFileEnable

Enables save logs to file. Log files located at: Library/Caches/Logs. Note that this method must be called before creating SDK object instance.

Warning: Deprecated. Use [VIClient saveLogToFileEnable] instead.

+ (void)saveLogToFileEnable
+  getInstance

Returns single SDK object instance

Warning: Deprecated. Use [VIClient initWithDelegateQueue:] instead.

+ (VoxImplant *)getInstance
Return

SingleSDK object instance.

Connect to VoxImplant Cloud
–  connect

Connect to VoxImplant cloud

Warning: Deprecated. Use [VIClient connect] intead.

- (void)connect
–  connect:

Connect to VoxImplant cloud

Warning: Deprecated. Use [VIClient connectWithConnectivityCheck:gateways:] instead.

- (void)connect:(bool)connectivityCheck
Parameters
connectivityCheck

Checks whether UDP traffic will flow correctly between device and VoxImplant cloud. This check reduces connection speed.

–  disableTLS

Disable TLS encryption for signalling connection. Media data will be encrypted anyway

Warning: Deprecated.

- (void)disableTLS
–  closeConnection

Closes connection with media server

Warning: Deprecated. Use [VIClient disconnect] instead.

- (void)closeConnection
Login to VoxImplant Cloud
–  loginWithUsername:andPassword:

Login to VoxImplant using specified username and password

Warning: Deprecated. Use [VIClient loginWithUser:password:success:failure:] instead.

- (void)loginWithUsername:(NSString *)user andPassword:(NSString *)password
Parameters
user

Username combined with application name, for example testuser@testapp.testaccount.voximplant.com

password

Password in plain text

–  loginWithUsername:andOneTimeKey:

Perform login using one time key that was generated before

- (void)loginWithUsername:(NSString *)user andOneTimeKey:(NSString *)hash
Parameters
user

Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

hash

Hash that was generated using following formula:

 MD5(oneTimeKey+"|"+MD5(user+":voximplant.com:"+password))

Please note that here user is just a user name, without app name, account name or anything else after “@”. So if you pass myuser@myapp.myacc.voximplant.com as a username, you should only use myuser while computing this hash.

–  loginWithUsername:andToken:

Login to VoxImplant using specified username and password

Warning: Deprecated. Use [VIClient loginWithUser:token:success:failure:] instead.

- (void)loginWithUsername:(NSString *)user andToken:(NSString *)token
Parameters
user

Username combined with application name, for example testuser\@testapp.testaccount.voximplant.com

–  refreshTokenWithUsername:andToken:

Perform refresh of login tokens required for login using access token

Warning: Deprecated. Use [VIClient refreshTokenWithUser:token:result:] instead.

- (void)refreshTokenWithUsername:(NSString *)user andToken:(NSString *)token
Parameters
user

Username combined with application name, for example testuser@testapp.testaccount.voximplant.com

token

Refresh token

–  requestOneTimeKeyWithUsername:

Generates one time login key to be used for automated login process.

Warning: Deprecated. Use [VIClient requestOneTimeKeyWithUser:result:] instead.

- (void)requestOneTimeKeyWithUsername:(NSString *)user
Parameters
user

Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

Call Management
–  createCall:withVideo:andCustomData:

Create new call instance. Call must be then started using startCall:withHeaders: method.

- (NSString *)createCall:(NSString *)to withVideo:(bool)video andCustomData:(NSString *)customData
Parameters
to

SIP URI, username or phone number to make call to. Actual routing is then performed by VoxEngine scenario

video

Enable video support in call

customData

Custom data passed with call. Will be available in VoxEngine scenario

Return

Pointer to a string representation of the call id

–  startCall:withHeaders:

Send start call request.

Warning: Deprecated. Use [VICall startWithHeaders:] instead.

- (bool)startCall:(NSString *)callId withHeaders:(NSDictionary *)headers
Parameters
callId

id of previously created call

headers

Optional set of headers to be sent with message. Names must begin with “X-” to be processed by SDK

Return

True in case of success, false otherwise (f.ex. if call with specified id is not found)

–  attachAudioTo:

Attach audio and video to specified call

Warning: Deprecated.

- (bool)attachAudioTo:(NSString *)callId
Parameters
callId

id of previously created call

Return

True in case of success, false otherwise (f.ex. if call with specified id is not found)

–  sendDTMF:digit:

Sends DTMF digit in specified call.

Warning: Deprecated. Use [VICall sendDTMF:] instead.

- (void)sendDTMF:(NSString *)callId digit:(int)digit
Parameters
callId

id of previously created call

digit

Digit can be 0-9 for 0-9, 10 for * and 11 for #

–  disconnectCall:withHeaders:

Terminates specified call. Call must be either established, or outgoing progressing

Warning: Deprecated. Use [VICall hangupWithHeaders:] instead.

- (bool)disconnectCall:(NSString *)callId withHeaders:(NSDictionary *)headers
Parameters
callId

id of previously created call

headers

Optional set of headers to be sent with message. Names must begin with “X-” to be processed by SDK

Return

True in case of success, false otherwise (f.ex. if call with specified id is not found)

–  declineCall:withHeaders:

Rejects incoming alerting call

Warning: Deprecated. Use [VICall rejectWithHeaders:] instead.

- (void)declineCall:(NSString *)callId withHeaders:(NSDictionary *)headers
Parameters
callId

id of previously created call

headers

Optional set of headers to be sent with message. Names must begin with “X-” to be processed by SDK

–  answerCall:withCustomData:headers:

Answers incoming alerting call

- (void)answerCall:(NSString *)callId withCustomData:(NSString *)customData headers:(NSDictionary *)headers
Parameters
callId

id of previously created call

customData

Optional custom data passed with call. Will be available in VoxEngine scenario

headers

Optional set of headers to be sent with message. Names must begin with “X-” to be processed by SDK

–  sendMessage:withText:andHeaders:

Sends instant message within established call

Warning: Deprecated. Use [VICall sendMessage:headers:] instead.

- (void)sendMessage:(NSString *)callId withText:(NSString *)text andHeaders:(NSDictionary *)headers
Parameters
callId

id of previously created call

text

Message text

headers

Optional set of headers to be sent with message. Names must begin with “X-” to be processed by SDK

–  sendInfo:withType:content:andHeaders:

Sends info within established call

Warning: Deprecated. Use [VICall sendInfo:mimeType:headers:] instead.

- (void)sendInfo:(NSString *)callId withType:(NSString *)mimeType content:(NSString *)content andHeaders:(NSDictionary *)headers
Parameters
callId

id of previously created call

mimeType

MIME type of info

content

Custom string data

headers

Optional set of headers to be sent with message. Names must begin with “X-” to be processed by SDK

–  getCallDuration:

Get call duration for established call

Warning: Deprecated. Use [VICall duration] instead.

- (NSTimeInterval)getCallDuration:(NSString *)callId
Parameters
callId

id of previously created call

Return

Call duration. 0 if call already disconnected.

–  setMute:

Mute or unmute microphone. This is reset after audio interruption

Warning: Deprecated. Use [VICall sendAudio] instead.

- (void)setMute:(bool)b
Parameters
b

Enable/disable flag

–  setUseLoudspeaker:

Enable/disable loudspeaker (doesn’t make sence for iPad, since it has only loudspeaker)

Warning: Deprecated. Use [VIAudioManager useLoudSpeaker] instead.

- (bool)setUseLoudspeaker:(bool)b
Parameters
b

Enable/disable flag

–  setVideoResizeMode:

Set video display mode. Applies to both incoming and outgoing stream

Warning: Deprecated. Use [VIVideoRendererView resizeMode] instead.

- (void)setVideoResizeMode:(enum VoxImplantVideoResizeMode)mode
Parameters
mode

Resize mode

–  getVideoResizeMode

Get video display mode. Applies to both incoming and outgoing streams

Warning: Deprecated.

- (enum VoxImplantVideoResizeMode)getVideoResizeMode
Return

Resize mode

–  sendVideo:

Stop/start sending video during the call

Warning: Deprecated. Use [VICall setSendVideo:completion:] instead.

- (void)sendVideo:(BOOL)doSend
Parameters
doSend

Specify if video should be sent

–  setLocalPreview:

Set container for local video preview

Warning: Deprecated. Use [VIVideoStream addRenderer:] instead.

- (void)setLocalPreview:(UIView *)view
Parameters
view

UIView

–  setRemoteView:

Set container for remote video display

Warning: Deprecated. Use [VIVideoStream addRenderer:] instead.

- (void)setRemoteView:(UIView *)view
Parameters
view

UIView

–  setRemoteView:forCall:

Set container for remote video display for call

Warning: Deprecated. Use [VIVideoStream addRenderer:] instead.

- (void)setRemoteView:(UIView *)view forCall:(NSString *)callId
Parameters
view

UIView

callId

id of the call

–  setResolution:andHeight:

Set resolution of video being sent to remote participant

Warning: Deprecated. Use [VICameraManager changeCaptureFormat:] instead.

- (void)setResolution:(int)width andHeight:(int)height
Parameters
width

Camera resolution width

height

Camera resolution height

–  connectTo:

Connect to particular VoxImplant media gateway

Warning: Deprecated. Use [VIClient connectWithConnectivityCheck:gateways:] instead.

- (void)connectTo:(NSString *)host
Parameters
host

Server name of particular media gateway for connection

–  hasFrontFacingCamera

Check if device has front facing camera

Warning: Deprecated.

- (BOOL)hasFrontFacingCamera
Return

True if device has front facing camera, false otherwise

–  switchToCameraWithPosition:

Switch to front/back camera

Warning: Deprecated. Use [VICameraManager useBackCamera]

- (BOOL)switchToCameraWithPosition:(AVCaptureDevicePosition)position
Parameters
position

Capture device position

Return

True in case of success, false otherwise

–  setHold:forCall:

Hold/unhold the call

- (void)setHold:(BOOL)hold forCall:(NSString *)callId
Parameters
hold

True if the call should be put on hold, false otherwise

callId

The call id

PushNotifications Methods
–  registerPushNotificationsToken:

Register Apple Push Notifications token, after calling this function, application will receive push notifications from Voximplant Server.

Warning: Deprecated. Use [VIClient registerPushNotificationsToken:imToken:] instead.

- (void)registerPushNotificationsToken:(NSData *)token
Parameters
token

The APNS token which comes from:

 - (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(PKPushType)type;
–  unregisterPushNotificationsToken:

Unregister Apple Push Notifications token, after calling this function, application stops receive push notifications from Voximplant Server.

- (void)unregisterPushNotificationsToken:(NSData *)token
Parameters
token

The APNS token which comes from:

 - (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(PKPushType)type;
–  handlePushNotification:

Handle incoming push notification

Warning: Deprecated. Use [VIClient handlePushNotification:] instead.

- (void)handlePushNotification:(NSDictionary *)notification
Parameters
notification

The incomming notification which comes from:

 - (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type { ... }