Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bit help with the usage guide #72

Open
utkarsh-c20y opened this issue Oct 2, 2021 · 2 comments
Open

A bit help with the usage guide #72

utkarsh-c20y opened this issue Oct 2, 2021 · 2 comments

Comments

@utkarsh-c20y
Copy link

utkarsh-c20y commented Oct 2, 2021

Hi @SketchingDev
I am trying to learn and use your repo with a Twilio's studio flow in flex. For some reason I am not able to connect my Twilio account with the script I am trying to build using ivr tester.
It's a very basic flow and I want to test If I can input some numbers when in IVR but my call never seems to connect and it just ends up being timeout.
Also in your usage guide there is a command which says node test.js where is that test.js
I assumed that maybe that test.js was a custom file, depends on the script.

So then I tried my own script which is as following:

const { googleSpeechToText } = require("ivr-tester-transcriber-google-speech-to-text");
const ivrTester = require("ivr-tester");
const config = { transcriber: googleSpeechToText({ languageCode: "en-US" }),twilioAuth: {accountSid: "ACXXXXXXXXXXXXXXXXX",authToken:"XXXXXXXXXXXXXXX"} };
new ivrTester.IvrTester(config).run(
    { from: "YYYYYYYYY", to: "XXXXXXXXXX" },
    {
      name: "Hello, Press a button",
      steps: [
        {
          whenPrompt: ivrTester.similarTo("Hello, Press a button"),   // this is what I have in my Twilio Flex's studio flow
          then: ivrTester.press("1"),
          silenceAfterPrompt: 3000,
          timeout: 6000,
        },
       ],
    }
  );

whenever I run this script as node script.js
it gives me following timeout error

Calling XXXXXXXXXX...
Timed out: call did not connect after 30s
The server has closed
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

so maybe I am not setting it up right or I am missing something, If you could guide or help me around it, that would be really great.

@bahunov
Copy link

bahunov commented Aug 7, 2023

I'm getting same issue.. have you started ngrok or directly running through the CLI?

@allavytalize
Copy link

I'm getting same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants