Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.get('/', (req, res) => {
app.post('/voice', (req, res) => {

// Generate a TwiML response
let twiml = new twilio.TwimlResponse();
let twiml = new twilio.twiml.VoiceResponse();

// Talk in a robot voice over the phone.
twiml.say('Call progress events are rad');
Expand All @@ -47,10 +47,10 @@ app.post('/voice', (req, res) => {
});

app.post('/events', (req, res) => {
let to = req.body.To;
let fromNumber = req.body.From;
let to = req.body.to;
let fromNumber = req.body.from;
let callStatus = req.body.CallStatus;
let callSid = req.body.CallSid;
let callSid = req.body.callSid;
console.log(fromNumber)

io.emit('status update', { to, fromNumber, callStatus, callSid });
Expand Down
4 changes: 2 additions & 2 deletions makeCall.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";

const twilio = require('twilio');
const client = twilio();
const client = new twilio();

client.makeCall({
client.calls.create({
url: '',
to: '',
from: '',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"react": "^0.14.0",
"react-dom": "^0.14.0",
"socket.io": "^1.3.6",
"twilio": "^2.3.0"
"twilio": "^3.6.1"
},
"devDependencies": {
"babel-core": "^6.0.12",
Expand Down