mirror of
https://github.com/donl/plivo-node.git
synced 2026-05-25 22:07:10 -06:00
15 lines
460 B
JavaScript
15 lines
460 B
JavaScript
var Plivo = require('../dist/rest/client.js');
|
|
var client = new Plivo.Client();
|
|
|
|
|
|
client.calls.create('', '', 'http://localhost/')
|
|
.then(function(call) {
|
|
console.log("\n============ make call ===========\n", call)
|
|
return client.calls.hangup(call.id)
|
|
})
|
|
.then(function(call){
|
|
console.log("\n============ hangup ===========\n", call)
|
|
})
|
|
.catch(function(response) {
|
|
console.log("\n============ Error :: ===========\n", response);
|
|
});
|