ukd1 / node-twilio

A (deprecated) Twilio helper library for node. Use the official one:
https://github.com/twilio/twilio-node
177 stars 56 forks source link

Dial Syntax? #21

Closed nickmerwin closed 7 years ago

nickmerwin commented 12 years ago

I'm trying to get it to just forward the call -- not sure what I'm doing wrong here:


phone.setup(function() {
  phone.on('incomingCall', function(reqParams, res) {
    console.log("New Call:");

    var dial = new Twiml.Dial({Number: new Twiml.Num("+15555555"), callerId: "+15555555"});

    res.append(dial);
    res.send();
  });
});

Twilio is saying app error but I'm not seeing anything in my logs -- perhaps a timeout. Do I need to listen for the answered event or am I just getting the Twiml API wrong?

Thanks!

sjwalter commented 12 years ago

What does the dashboard debugger say? Can you paste its contents?

It could be a multitude of things. Do you control callerId +155555555? (I'm assuming you're using a legit number in your code--but that number must be either a Twilio number in your account or a caller id you've verified with Twilio.

On Fri, Jan 20, 2012 at 11:41 AM, Nick Merwin < reply@reply.github.com

wrote:

I'm trying to get it to just forward the call -- not sure what I'm doing wrong here:


phone.setup(function() {
 phone.on('incomingCall', function(reqParams, res) {
   console.log("New Call:");

       var dial = new Twiml.Dial({Number: new Twiml.Num("+15555555"),
callerId: "+15555555"});

       res.append(dial);
       res.send();
 });
});

Twilio is saying app error but I'm not seeing anything in my logs -- perhaps a timeout. Do I need to listen for the answered event or am I just getting the Twiml API wrong?

Thanks!


Reply to this email directly or view it on GitHub: https://github.com/sjwalter/node-twilio/issues/21

ukd1 commented 7 years ago

This library is deprecated in favor of the official library - https://github.com/twilio/twilio-node