TVOCall Class Reference

Inherits from NSObject
Declared in TVOCall.h

Overview

The TVOCall class represents a bi-directional voice Call. TVOCall objects are not created directly; they are returned by [TVOCallInvite acceptWithDelegate:] or [TwilioVoice call:params:delegate:].

CallKit Call Actions

Properties

  delegate

The TVOCallDelegate object that will receive Call state updates.

@property (nonatomic, weak, readonly, nullable) id<TVOCallDelegate> delegate

See Also

Declared In

TVOCall.h

  from

From value of the Call.

@property (nonatomic, strong, readonly, nullable) NSString *from

Discussion

This may be nil if the call object was created by calling the [TwilioVoice call:params:delegate:] method.

Declared In

TVOCall.h

  to

To value of the Call.

@property (nonatomic, strong, readonly, nullable) NSString *to

Discussion

This may be nil if the call object was created by calling the [TwilioVoice call:params:delegate:] method.

Declared In

TVOCall.h

  sid

A server assigned identifier (SID) for the Call.

@property (nonatomic, strong, readonly, nonnull) NSString *sid

Discussion

A SID is a globally unique identifier which can be very useful for debugging Call traffic.

Declared In

TVOCall.h

  muted

Property that defines if the Call is muted.

@property (nonatomic, assign, getter=isMuted) BOOL muted

Discussion

Setting the property will only take effect if the state is TVOCallStateConnected.

Declared In

TVOCall.h

  state

The current state of the Call.

@property (nonatomic, assign, readonly) TVOCallState state

Discussion

All TVOCall instances start in TVOCallStateConnecting and end in TVOCallStateDisconnected. After creation, a Call will transition to TVOCallStateConnected if successful or TVOCallStateDisconnected if the connection attempt fails.

See Also

Declared In

TVOCall.h

  onHold

Property that defines if the Call is on hold.

@property (nonatomic, getter=isOnHold) BOOL onHold

Discussion

Holding a Call ceases the flow of audio between parties. Setting the property will only take effect if the state is TVOCallConnected. While placing the Call on hold ceases the flow of audio, to deactivate the audio device you must disable it via the audioEnabled property on the TwilioVoice class. This operation is performed automatically in response to an AVAudioSession interruption.

Declared In

TVOCall.h

General Call Actions

– disconnect

Disconnects the Call.

- (void)disconnect

Discussion

Calling this method on a TVOCall that is in the state TVOCallStateDisconnected has no effect.

Declared In

TVOCall.h

– sendDigits:

Send a string of digits.

- (void)sendDigits:(nonnull NSString *)digits

Parameters

digits

A string of characters to be played. Valid values are ‘0’ - ‘9’, ‘*’, ‘#’, and ‘w’. Each ‘w’ will cause a 500 ms pause between digits sent.

Discussion

Calling this method on a TVOCall that is not in the state TVOCallStateConnected has no effect.

Declared In

TVOCall.h

CallKitIntegration Methods

  uuid

A unique identifier for the Call.

@property (nonatomic, strong, readonly, nonnull) NSUUID *uuid

Discussion

Use this UUID to identify the TVOCall when working with CallKit. You can provide a UUID for outgoing calls using [TwilioVoice call:params:uuid:delegate:]. Calls created via [TVOCallInvite acceptWithDelegate:] inherit their uuid from the Invite itself.

Declared In

TVOCall.h