Class: Vonage::Video::SIP

Inherits:
Namespace
  • Object
show all
Defined in:
lib/vonage/video/sip.rb

Instance Method Summary collapse

Instance Method Details

#dial(session_id:, token:, sip_uri:, **params) ⇒ Object

Initiate an outbound SIP call.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/vonage/video/sip.rb', line 16

def dial(session_id:, token:, sip_uri:, **params)
  request(
    '/v2/project/' + @config.application_id + '/dial',
    params: camelcase({
      session_id: session_id,
      token: token,
      sip: params.merge({uri: sip_uri})
      }),
    type: Post
  )
end

#play_dtmf_to_connection(session_id:, connection_id:, dtmf_digits:) ⇒ Object

Play DMTF tones into a specific connection.



40
41
42
43
44
45
46
# File 'lib/vonage/video/sip.rb', line 40

def play_dtmf_to_connection(session_id:, connection_id:, dtmf_digits:)
  request(
    '/v2/project/' + @config.application_id + '/session/' + session_id + '/connection/' + connection_id + '/play-dtmf',
    params: {digits: dtmf_digits},
    type: Post
  )
end

#play_dtmf_to_session(session_id:, dtmf_digits:) ⇒ Object

Play DTMF tones into a SIP call.



30
31
32
33
34
35
36
# File 'lib/vonage/video/sip.rb', line 30

def play_dtmf_to_session(session_id:, dtmf_digits:)
  request(
    '/v2/project/' + @config.application_id + '/session/' + session_id + '/play-dtmf',
    params: {digits: dtmf_digits},
    type: Post
  )
end