Giter VIP home page Giter VIP logo

node-twilio-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-twilio-api's Issues

Message paging issues

Hi there,

I could fetch 1000 messages from twilio api, after that i'm getting error messages resource not fount.

How do i get more messages, the code which i've used is as below.

Please help me here...

var twilio = require('twilio');
var accountSid = 'ACxxx';
var authToken = 'yyy';
var client = twilio(accountSid, authToken);
var baseUrl = 'https://' + accountSid + ': '+ authToken + '@' + client.host;
function handleResults(err, data) {
if (err) {
return console.error(err);
}
// do something with current page...
console.log(data.messages);
if (data.numPages > 1) {
// request the next page in the janky way
client.request({
url: baseUrl + data.nextPageUri,
qs: {
// need to use actual REST API parameter - this method does not
// massage inputs, it's pretty much a direct passthrough to
// the underlying HTTP client (mikeal/request)
PageSize: 1000
}
}, handleResults);
}
}
// fetch resources normally
client.listMessages({
pageSize: 1000
}, handleResults);

Thanks,
Sudhakar

Am I on the right track? (receive a call, attempt to forward to two other numbers simultaneously, if that fails, take a message)

Hey Blake,

I've been trying to build the following:
http://forum.twilio.com/twilio/topics/is_this_possible_receive_a_call_attempt_to_forward_to_two_other_numbers_simultaneously_if_that_fails_take_a_message

And came up with the following code:
https://gist.github.com/2011413

Can you give it a quick skim and tell me if I am even on the right track, and provide any advice at all. No need to take longer than a few seconds if you don't want to, just want to know if I'm wasting my time or whether I'm rocking it up. Thanks mate :)

Twilio Status Callback URL

Hello,

I've been using twilio-api to set up a simple call center, but I found that on the Twilio monitor page I'm getting Warning: 15003 - Call Progress: Error Response to Callback URL. For what I can see when I use:

call.on('ended', function(status, duration){
    console.log(status);
    console.log(duration);
});

That is basically the callback route. So I wonder what I should do to not get this warning.

CB from Call.record() never called

I can't manage to get both cb() and cbifempty() working, after making a phone call to Twilio.

Here is my actual code :

function emptyCB(a,v) {
  console.log("EMPTY", a, v)
}

function functionCB(call, recordingUrl, recordingDuration, input) {
  console.log(call, recordingUrl, recordingDuration, input)
}

app.post('/voice', function (req, res) {
  var twiml = new twilio.TwimlResponse();
  twiml.say('Hello. This is my webtask to record your call.');

  twiml.record(functionCB, {maxLength : "50"}, emptyCB);

  twiml.hangup();

  res.type('text/xml');
  res.send(twiml.toString());
});

Any idea why this isn't working?

Thanks!

Clarification with app registration

Hi! I'm quite excited to use the library, but I'm running into an issue with registering an application. Do I use the SID of an existing app? When I try that, it throws "Error: This application cannot be registered because required fields are missing or invalid."

The code is literally copied from the readme, with the SID's replaced. Thanks!

Examples

Thanks for your great work with this lib.
Would you please show some more samples in addition to whats in the repo and the /test. Perhaps sme samples of generating a "record" twiML would be great.
ie. on incoming calls, authenticate user on gathering touch pad and then record user voice and pass back the recoded audio url etc...

Thanks

handle request errors

Thx for this!

I added the following to lib/Client.js:168 after I started getting timeouts and refusals from Twilio. This will keep your app from crashing from uncaught errors.

req.on('error', function(err){
    // console.log(err);
})

docs: Clarify possible call status values

For 'connected' and 'ended' Call events, what are the possible call status values?

I understand that Twilio provides a list of possible call statuses, but I cannot figure out which of those apply to which event.

An official reply from a Twilio representative would be appropriate here or a reference URL to Twilio documentation that clarifies this issue.

Incomings calls are not added app._pendingCalls

When a status callback comes in for that call, it doesn't know who the call is for and throws an error.

2012-04-27T20:51:28+00:00 app[web.1]: Error: Twilio submitted call status for a call that does not exist.
2012-04-27T20:51:28+00:00 app[web.1]: at /app/node_modules/twilio-api/lib/Application.js:297:11
2012-04-27T20:51:28+00:00 app[web.1]: at HTTPParser.onMessageComplete (http.js:137:23)
2012-04-27T20:51:28+00:00 app[web.1]: at IncomingMessage.emit (events.js:64:17)
2012-04-27T20:51:28+00:00 app[web.1]: at Socket.ondata (http.js:1410:22)
2012-04-27T20:51:28+00:00 app[web.1]: at afterBodyParser (/app/node_modules/twilio-api/lib/Application.js:181:6)

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.