Coder Social home page Coder Social logo

plivo-meteor's Introduction

Meteor wrapper for Plivo, the telephony framework

This smart package wraps the npm package for Plivo, an open source telephony and SMS application prototyping framework.

This uses version 0.1.0 of the Plivo Node.js package and the new meteor 0.6.0 npm bindings.

To get started, replace AUTH_ID, AUTH_TOKEN with your Plivo credentials and use some of the examples below:

####Send an SMS text message

  plivo = Plivo.RestAPI({
    authId: AUTH_ID,
    authToken: AUTH_TOKEN,
  });

  var params = {
      'src': 'xxxxxxxxxx', // Caller Id
      'dst' : 'xxxxxxxxxx', // User Number to Call
      'text' : "Hi, message from Plivo",
      'type' : "sms",
  };

  plivo.send_message(params, function (status, response) {
      console.log('Status: ', status);
      console.log('API Response:\n', response);
  });

####Place a phone call, and respond with instructions from the given URL

  plivo = Plivo.RestAPI({
    authId: AUTH_ID,
    authToken: AUTH_TOKEN,
  });
  
  var params = {};
  params.from = "xxxxxxxxxx";
  params.to = "xxxxxxxxxx";
  params.answer_url = "http://somesite.com/answer_url.xml";

  plivo.make_call(params, function (status, response) {
      console.log('Status: ', status);
      console.log('API Response:\n', response);
  });

For more examples, check out the official Plivo node.js quickstart repo.

plivo-meteor's People

Contributors

dandv avatar

Stargazers

Rémi Barbe avatar Aykut Yaman avatar Jonathan Barratt avatar Eelco Wiersma avatar

Watchers

James Cloos avatar Andrei Oprisan avatar  avatar

Forkers

pfafman

plivo-meteor's Issues

"Plivo undefined"

After installing the package, this call:

var plivo = Plivo.RestAPI({
    authId: 'xxx',
    authToken: 'xxx',
});

var params = {
  'src': 'MyApp', // Caller Id
  'dst' : 'xxx', // User Number to Call
  'text' : "Hi, message from Plivo",
  'type' : "sms",
};

  plivo.send_message(params, function (status, response) {
      console.log('Status: ', status);
      console.log('API Response:\n', response);
  });

Returns this error:

Uncaught TypeError: Cannot read property 'RestAPI' of undefined(…)

And stops.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.