Module: TwilioBase::Protocols::Voice::Default
- Defined in:
- app/services/twilio_base/protocols/voice.rb
Class Method Summary collapse
Class Method Details
.init(params: {}, protocol: nil, to:) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/services/twilio_base/protocols/voice.rb', line 9 def init(params: {}, protocol: nil, to:) protocol ||= ENV.fetch('VOICE_PROTOCOL') klass = { 'pstn' => Protocols::Voice::Pstn, 'sip' => Protocols::Voice::Sip }.fetch(protocol.to_s, Protocols::Voice::Pstn) klass.new( params: params, to: to ) end |