node-twilio icon indicating copy to clipboard operation
node-twilio copied to clipboard

Dial Syntax?

Open nickmerwin opened this issue 14 years ago • 2 comments

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!

nickmerwin avatar Jan 20 '12 19:01 nickmerwin

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 < [email protected]

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

sjwalter avatar Jan 20 '12 19:01 sjwalter

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

ukd1 avatar Aug 13 '17 05:08 ukd1