0

I have a node js/express application that is using the twilio automated voice survey, and I have this issue where if my phone number calls the survey, the program jumps to the last statement in the survey, and then ends. None of the questions of the survey are asked.

However when any other number calls, the survey works as normal. Does anyone have some insight on this problem?

I even tested the node js/express application with another twilio number, and this problem still arises with my phone number.

I am using ngrok as a webhook for the application.

I am not sure if the problem is somewhere in my mongoDB, and I do not think I have filtered my number anywhere in the node js application

Please let me know if there is any useful information I can add to make this question more insightful

Here is some relevant code from the survey, which takes in the survey data (the survey questions), filters through the users recorded responses (survey response):

var SurveyResponse = require('../models/SurveyResponse');
var survey = require('../survey_data');


module.exports = function(request, response) {
    SurveyResponse.find({
        complete: true
    }).limit(100).exec(function(err, docs) {
        if (err) {
            response.status(500).send(err);
        } else {
            response.send({
                survey: survey,
                results: docs
            });
        }
     });
};
mapema
  • 13
  • 5
  • Is it because your number has already taken the survey and the code directs those calls straight to the end? If not, can you share some of the code, otherwise it's impossible to see what might be wrong. – philnash Jul 10 '17 at 20:08
  • i do not think that is the problem. i have called the survey many times with this phone number. The meat of the code currently from the survey tutorial: https://www.twilio.com/docs/tutorials/automated-survey-node-express. will add some relevant code to question – mapema Jul 10 '17 at 21:18
  • Can you look into your Mongo instance and extract the document on your phone number and share it? Or perhaps delete the record of your number from the database and see what happens? – philnash Jul 10 '17 at 22:40

0 Answers0