Module: Ucpaas::Call

Included in:
Client
Defined in:
lib/ucpaas/call.rb

Overview

call client api

Instance Method Summary collapse

Instance Method Details

#dull_call(app_id, from_number, to_number, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/ucpaas/call.rb', line 4

def dull_call(app_id, from_number, to_number, options = {})
  client = find_or_create_client(app_id, from_number)
  client_number = client['clientNumber']
  data = {
    callback: {
      appId: app_id,
      fromClient: client_number,
      to: to_number
    }.merge(options)
  }
  response = post('/Calls/callBack.json', data)
  response['resp']['callback']
end