TVOCallMessageDelegate

Objective-C

@protocol TVOCallMessageDelegate <NSObject>

Swift

protocol TVOCallMessageDelegate : NSObjectProtocol

TVOCallMessageDelegate provides callbacks when call message is received or when the result of outbound message request is available.

  • @brief Notifies the delegate that a message with the event type is received during a <TVOCall>.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)messageReceivedForCallSid:(nonnull NSString *)callSid
                              message:(nonnull TVOCallMessage *)callMessage;

    Swift

    optional func messageReceived(forCallSid callSid: String, message callMessage: TVOCallMessage)

    Parameters

    callSid

    The unique identifier of the <TVOCall> or <TVOCallInvite> that received the message.

    callMessage

    The <TVOCallMessage>.

  • @brief Notifies the delegate that a message was sent.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)messageSentForCallSid:(nonnull NSString *)callSid
                    voiceEventSid:(nonnull NSString *)voiceEventSid;

    Swift

    optional func messageSent(forCallSid callSid: String, voiceEventSid: String)

    Parameters

    callSid

    The unique identifier of the <TVOCall> or <TVOCallInvite> that successfully sent the message.

    voiceEventSid

    The same unique identifier to be associated with the unique identifier returned from the [TVOCall sendMessage:] or [TVOCallInvite sendMessage:] method.

  • @brief Notifies the delegate that a message was failed to be sent out.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)messageFailedForCallSid:(nonnull NSString *)callSid
                      voiceEventSid:(nonnull NSString *)voiceEventSid
                              error:(nonnull NSError *)error;

    Swift

    optional func messageFailed(forCallSid callSid: String, voiceEventSid: String, error: any Error)

    Parameters

    callSid

    The unique identifier of the <TVOCall> or <TVOCallInvite> that failed to send the message.

    voiceEventSid

    The same unique identifier to be associated with the unique identifier returned from the [TVOCall sendMessage:] or [TVOCallInvite sendMessage:] method.

    error

    The <NSError> that occurred.

  • Deprecated

    Will not be supported in TwilioVoice v6.11+

    @brief Notifies the delegate that a message with the event type is received during a <TVOCall>.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        didReceiveMessage:(nonnull TVOCallMessage *)callMessage;

    Swift

    optional func call(_ call: Any!, didReceive callMessage: TVOCallMessage)

    Parameters

    call

    The <TVOCall> that received the message.

    callMessage

    The <TVOCallMessage>.

  • Deprecated

    Will not be supported in TwilioVoice v6.11+

    @brief Notifies the delegate that a message was sent.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        didSendMessage:(nonnull NSString *)voiceEventSid;

    Swift

    optional func call(_ call: Any!, didSendMessage voiceEventSid: String)

    Parameters

    call

    The <TVOCall> that successfully sent the message.

    voiceEventSid

    The same unique identifier to be associated with the unique identifier returned from the [TVOCall sendMessage:] method.

  • Deprecated

    Will not be supported in TwilioVoice v6.11+

    @brief Notifies the delegate that a message was failed to be sent out.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        didFailToSendMessage:(nonnull NSString *)voiceEventSid
                       error:(nonnull NSError *)error;

    Swift

    optional func call(_ call: Any!, didFailToSendMessage voiceEventSid: String, error: any Error)

    Parameters

    call

    The <TVOCall> that failed to send the message.

    voiceEventSid

    The same unique identifier to be associated with the unique identifier returned from the [TVOCall sendMessage:] method.

    error

    The <NSError> that occurred.

  • Deprecated

    Will not be supported in TwilioVoice v6.11+

    @brief Notifies the delegate that a message with the event type is received by the <TVOCallInvite>.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)callInvite:(nonnull TVOCallInvite *)callInvite
        didReceiveMessage:(nonnull TVOCallMessage *)callMessage;

    Swift

    optional func callInvite(_ callInvite: Any!, didReceive callMessage: TVOCallMessage)

    Parameters

    callInvite

    The <TVOCallInvite> that received the message.

    callMessage

    The <TVOCallMessage>.

  • Deprecated

    Will not be supported in TwilioVoice v6.11+

    @brief Notifies the delegate that a message was sent.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)callInvite:(nonnull TVOCallInvite *)callInvite
        didSendMessage:(nonnull NSString *)voiceEventSid;

    Swift

    optional func callInvite(_ callInvite: Any!, didSendMessage voiceEventSid: String)

    Parameters

    callInvite

    The <TVOCallInvite> that successfully sent the message.

    voiceEventSid

    The same unique identifier to be associated with the unique identifier returned from the [TVOCallInvite sendMessage:callMessageDelegate:] method.

  • Deprecated

    Will not be supported in TwilioVoice v6.11+

    @brief Notifies the delegate that a message was failed to be sent out.

    @discussion This feature is currently in Beta.

    Declaration

    Objective-C

    - (void)callInvite:(nonnull TVOCallInvite *)callInvite
        didFailToSendMessage:(nonnull NSString *)voiceEventSid
                       error:(nonnull NSError *)error;

    Swift

    optional func callInvite(_ callInvite: Any!, didFailToSendMessage voiceEventSid: String, error: any Error)

    Parameters

    callInvite

    The <TVOCallInvite> that failed to send the message.

    voiceEventSid

    The same unique identifier to be associated with the unique identifier returned from the [TVOCallInvite sendMessage:callMessageDelegate:] method.

    error

    The <NSError> that occurred.