Class: OpenAI::Models::Webhooks::LiveTransportIncomingWebhookEvent::Data::SipHeader

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/webhooks/live_transport_incoming_webhook_event.rb,
sig/openai/models/webhooks/live_transport_incoming_webhook_event.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(session_id:, sip_headers:, type: :sip) ⇒ SipHeader

Event data payload.

Parameters:

  • session_id (String)

    The live_... ID of the pending SIP session. Forward this value unchanged when accepting or rejecting the call through the Live API.

  • sip_headers (Array<OpenAI::Models::Webhooks::LiveTransportIncomingWebhookEvent::Data::SipHeader>)

    Headers from the SIP INVITE, excluding SIP authorization headers. Retained names, values, repeated entries, and order are preserved. Treat these values as untrusted call metadata.

  • type (Symbol, :sip) (defaults to: :sip)

    The incoming transport type. Always sip.

  • name: (String)
  • value: (String)


99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/openai/models/webhooks/live_transport_incoming_webhook_event.rb', line 99

class SipHeader < OpenAI::Internal::Type::BaseModel
  # @!attribute name
  #   Name of the SIP Header.
  #
  #   @return [String]
  required :name, String

  # @!attribute value
  #   Value of the SIP Header.
  #
  #   @return [String]
  required :value, String

  # @!method initialize(name:, value:)
  #   A header from the SIP Invite.
  #
  #   @param name [String]
  #     Name of the SIP Header.
  #
  #   @param value [String]
  #     Value of the SIP Header.
end

Instance Attribute Details

#nameString

Name of the SIP Header.

Parameters:

  • value (String)

Returns:

  • (String)


104
# File 'lib/openai/models/webhooks/live_transport_incoming_webhook_event.rb', line 104

required :name, String

#valueString

Value of the SIP Header.

Parameters:

  • value (String)

Returns:

  • (String)


110
# File 'lib/openai/models/webhooks/live_transport_incoming_webhook_event.rb', line 110

required :value, String

Instance Method Details

#to_hash{ name: String, value: String }

Returns:

  • ({ name: String, value: String })


79
# File 'sig/openai/models/webhooks/live_transport_incoming_webhook_event.rbs', line 79

def to_hash: -> { name: String, value: String }