SIGN UP

VoxImplant

Deprecated

Use VIClient, VICall instead.

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

Methods

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

Answers incoming alerting call

Parameters

  • callId:

    NSString *

    id of previously created call

  • customData:

    NSString *

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

  • headers:

    NSDictionary *

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

attachAudioTo:

Deprecated
- (BOOL)attachAudioTo:(NSString *)callId

No longer available.

Attach audio and video to specified call

Parameters

  • callId:

    NSString *

    id of previously created call

Returns

  • Return:

    BOOL

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

closeConnection

Deprecated
- (void)closeConnection

Closes connection with media server

connect

Deprecated
- (void)connect

Use [VIClient connect] instead.

Connect to Voximplant cloud

connect:

Deprecated
- (void)connect:(BOOL)connectivityCheck

Connect to Voximplant cloud

Parameters

  • connectivityCheck:

    BOOL

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

connectTo:

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

Connect to particular Voximplant media gateway

Parameters

  • host:

    NSString *

    Server name of particular media gateway for connection

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

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

Parameters

  • to:

    NSString *

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

  • video:

    BOOL

    Enable video support in call

  • customData:

    NSString *

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

Returns

  • Return:

    NSString *

    String representation of the call id

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

Rejects incoming alerting call

Parameters

  • callId:

    NSString *

    id of previously created call

  • headers:

    NSDictionary *

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

disableTLS

Deprecated
- (void)disableTLS

No longer available.

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

- (BOOL)disconnectCall:(NSString *)callId
           withHeaders:(NSDictionary *)headers

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

Parameters

  • callId:

    NSString *

    id of previously created call

  • headers:

    NSDictionary *

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

Returns

  • Return:

    BOOL

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

- (NSTimeInterval)getCallDuration:(NSString *)callId

Use [VICall duration] instead.

Get call duration for established call

Parameters

  • callId:

    NSString *

    id of previously created call

Returns

  • Return:

    NSTimeInterval

    Call duration. 0 if call already disconnected.

getInstance

Deprecated
+ (VoxImplant *)getInstance

Returns single SDK object instance

Returns

  • Return:

    VoxImplant *

    Voximplant SDK object instance.

+ (VoxImplant *)getInstanceWithBundleId:(NSString *)bundleId

Returns single SDK object instance

You need to use this only if you are going to send push notifications across several iOS apps using a single Voximplant application.

Parameters

  • bundleId:

    NSString *

    Application bundle id

Returns

  • Return:

    VoxImplant *

    Voximplant SDK object instance.

- (enum VoxImplantVideoResizeMode)getVideoResizeMode

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

Returns

  • Return:

    enum VoxImplantVideoResizeMode

    Resize mode

getVoxDelegate

Deprecated
- (id<VoxImplantDelegate>)getVoxDelegate

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

Returns current delegate

Returns

- (void)handlePushNotification:(NSDictionary *)notification

Handle incoming push notification

Parameters

- (BOOL)hasFrontFacingCamera

No longer available.

Check if device has front facing camera

Returns

  • Return:

    BOOL

    YES if device has front facing camera, NO otherwise

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

Perform login using one time key that was generated before

Parameters

  • user:

    NSString *

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

  • hash:

    NSString *

    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.

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

Login to Voximplant using specified username and password

Parameters

  • user:

    NSString *

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

  • password:

    NSString *

    Password in plain text

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

Login to Voximplant using specified username and password

Parameters

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

Perform refresh of login tokens required for login using access token

Parameters

  • user:

    NSString *

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

  • token:

    NSString *

    Refresh token

- (void)registerPushNotificationsToken:(NSData *)token

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

Parameters

- (void)requestOneTimeKeyWithUsername:(NSString *)user

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

For additional details see:

Parameters

  • user:

    NSString *

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

+ (void)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.

sendDTMF:digit:

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

Use [VICall sendDTMF:] instead.

Sends DTMF digit in specified call.

Parameters

  • callId:

    NSString *

    id of previously created call

  • digit:

    int

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

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

Sends info within established call

Parameters

  • callId:

    NSString *

    id of previously created call

  • mimeType:

    NSString *

    MIME type of info

  • content:

    NSString *

    Custom string data

  • headers:

    NSDictionary *

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

- (void)sendMessage:(NSString *)callId
           withText:(NSString *)text

Use VICall sendMessage:headers: instead.

Sends instant message within established call

Parameters

  • callId:

    NSString *

    id of previously created call

  • text:

    NSString *

    Message text

sendVideo:

Deprecated
- (void)sendVideo:(BOOL)doSend

Stop/start sending video during the call

Parameters

  • doSend:

    BOOL

    Specify if video should be sent

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

Hold/unhold the call

Parameters

  • hold:

    BOOL

    YES if the call should be put on hold, NO otherwise

  • callId:

    NSString *

    The call id

- (void)setLocalPreview:(UIView *)view

Set container for local video preview

Parameters

  • view:

    UIView *

    UIView

setLogLevel:

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

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

Parameters

  • logLevel:

    enum VoxImplantLogLevel

    Log verbosity level

setMute:

Deprecated
- (void)setMute:(BOOL)b

Use [VICall sendAudio] instead.

Mute or unmute microphone. This is reset after audio interruption

Parameters

  • b:

    BOOL

    Enable/disable flag

setRemoteView:

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

Set container for remote video display

Parameters

  • view:

    UIView *

    UIView

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

Set container for remote video display for call

Parameters

  • view:

    UIView *

    UIView

  • callId:

    NSString *

    id of the call

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

Set resolution of video being sent to remote participant

Parameters

  • width:

    int

    Camera resolution width

  • height:

    int

    Camera resolution height

- (BOOL)setUseLoudspeaker:(BOOL)b

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

Parameters

  • b:

    BOOL

    Enable/disable flag

Returns

  • Return:

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

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

Parameters

  • mode:

    enum VoxImplantVideoResizeMode

    Resize mode

- (BOOL)startCall:(NSString *)callId
      withHeaders:(NSDictionary *)headers

Send start call request.

Parameters

  • callId:

    NSString *

    id of previously created call

  • headers:

    NSDictionary *

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

Returns

  • Return:

    BOOL

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

- (BOOL)switchToCameraWithPosition:(AVCaptureDevicePosition)position

Switch to front/back camera

Parameters

  • position:

    AVCaptureDevicePosition

    Capture device position

Returns

  • Return:

    BOOL

    YES in case of success, NO otherwise

- (void)unregisterPushNotificationsToken:(NSData *)token

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

Parameters

Properties

voxDelegate

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

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

Set delegate object for SDK