NXMCall

Objective-C

@interface NXMCall : NSObject

Swift

class NXMCall : NSObject

The NXMCall class is a NXMConversation for phone calls.

Note

NXMCall can be and incoming call or outgoing call.
  • Conversation associated to the call.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NXMConversation *conversation;

    Swift

    var conversation: NXMConversation { get }
  • Indicates my call member.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NXMMember *myMember;

    Swift

    var myMember: NXMMember? { get }
  • Indicates all the call members.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSArray<NXMMember *> *allMembers;

    Swift

    var allMembers: [NXMMember] { get }
  • Set the delegate, NXMCallDelegate, for the call object.

    Declaration

    Objective-C

    - (void)setDelegate:(nonnull id<NXMCallDelegate>)delegate;

    Swift

    func setDelegate(_ delegate: NXMCallDelegate)

    Parameters

    delegate

    A NXMCallDelegate object.

  • Answer an incoming call.

    Warning

    You can only answer a call when the call member status is ringing.

    Declaration

    Objective-C

    - (void)answer:(NXMCompletionCallback _Nullable)completionHandler;

    Swift

    func answer(_ completionHandler: NXMCompletionCallback? = nil)

    Parameters

    completionHandler

    A NXMErrorCallback block.

  • Reject an incoming call.

    Warning

    You can only answer a call when the call member status is ringing.

    Declaration

    Objective-C

    - (void)reject:(NXMCompletionCallback _Nullable)completionHandler;

    Swift

    func reject(_ completionHandler: NXMCompletionCallback? = nil)

    Parameters

    completionHandler

    A NXMErrorCallback block.

  • Add a member to a call using a username.

    Declaration

    Objective-C

    - (void)addCallMemberWithUsername:(nonnull NSString *)username
                    completionHandler:
                        (NXMCompletionCallback _Nullable)completionHandler;

    Swift

    func addMember(withUsername username: String, completionHandler: NXMCompletionCallback? = nil)

    Parameters

    username

    The username of the member you want to add.

    completionHandler

    A NXMErrorCallback block.

  • Add a member to a call using a number.

    Declaration

    Objective-C

    - (void)addCallMemberWithNumber:(nonnull NSString *)number
                  completionHandler:
                      (NXMCompletionCallback _Nullable)completionHandler;

    Swift

    func addMember(withNumber number: String, completionHandler: NXMCompletionCallback? = nil)

    Parameters

    number

    The number of the member you want to add.

    completionHandler

    A NXMErrorCallback block.

  • Sends DTMF digits to the call.

    Declaration

    Objective-C

    - (void)sendDTMF:(nonnull NSString *)dtmf;

    Swift

    func sendDTMF(_ dtmf: String)

    Parameters

    dtmf

    The DTMF digit(s) to send.

  • Hangup an ongoing call.

    Declaration

    Objective-C

    - (void)hangup;

    Swift

    func hangup()
  • Get the current call status giving a NXMMember.

    Declaration

    Objective-C

    - (NXMCallMemberStatus)callStatusForMember:(nonnull NXMMember *)member;

    Swift

    func callStatus(for member: NXMMember) -> NXMCallMemberStatus

    Parameters

    member

    A NXMMember to get the current status from.

  • Mute the current user member.

    Declaration

    Objective-C

    - (void)mute;

    Swift

    func mute()
  • Unmute the current user member.

    Declaration

    Objective-C

    - (void)unmute;

    Swift

    func unmute()
  • Reconnect the current call.

    Declaration

    Objective-C

    - (void)reconnect;

    Swift

    func reconnect()