MakingChatbots / ivr-tester

An automated testing framework for Interactive Voice Response (IVR) call flows
https://ivr-tester.makingchatbots.com/
MIT License
27 stars 9 forks source link

Call does not hang-up in twilio #91

Open LuisAntezana opened 1 year ago

LuisAntezana commented 1 year ago

Hello, this tool is fantastic. I found that even though I set a hang-up in the scenario file or if the test fails, the call should be terminated. The transcription file and the recording audio looks fine BUT if I go to twilio and look for the call, I find that the call is still in progress until the responder hangs up. This is a big issue because that call's cost will depend not on the scenario file but on when the responder hangs up.

How it should work: If an error, failed or successful test has occurred. The call must be terminated (hang up) in twilio as well.

SketchingDev commented 1 year ago

Hi, thanks for kind words. That is indeed odd, I just ran a contrived test to ensure terminating the underlying WebSocket connection ends the call in Twilio and it does. So either the hangUp command or the process running the scenario ending should have resulted in the WebSocket connection being terminated.

I'm wondering whether either:

I am currently rewriting IVR Tester from the ground up, so will ensure I test this in the new release. Thanks for bringing it to my attention.

LuisAntezana commented 1 year ago

Hi @SketchingDev thanks for the response, so far I've done many tests one after another without a problem so I guess the ngrok may not be the issue. Also, I forgot to mention that I'm using the CLI version + AWS translate service. The scenario file is something similar to this:

{
    "name": "Demo: hang up",
    "steps": [
        {
            "whenPrompt": {
                "type": "similarTo",
                "value": "Thank you for calling."
            },
            "then": {
                "type": "hangUp"
            },
            "silenceAfterPrompt": 2000,
            "timeout": 5000
        }
    ]
}

And my config file:

{
    "transcriber": {
        "name": "amazon-transcribe",
        "options": {
            "languageCode": "en-US",
            "region": "us-east-1"
        }
    },
    "recording": {
        "audio": {
            "outputPath": "./audios"
        },
        "transcript": {
            "outputPath": "./recordings",
            "includeResponse": true
        }
    }
}

I have tested it on my PC (Windows 10) and in an Alpine container with the same result. I hope this information is helpful.

Alejandro-KS commented 1 year ago

We are having the same issue :(

yamini-bisht commented 7 months ago

Hello @LuisAntezana Were you able to receive DTMF input in Twilio IVR for the gather input widgets while testing this? For me it get's stuck at gather cause Twilio IVR is not registering the "press" input provided in the test cases.