Twilio Channel API's not working - Rasa CALM - Rasa Community Forum

👋 Introducing the Rasa Playground

Twilio Channel API’s not working

post by jlciii on Jan 16, 2025

jlciii
John Cunningham

I believe that my “twilio_voice” endpoints are not working properly, and it’s not clear to me whether they even exist at all.

Right now, my traditional REST API’s appear to be working properly, and interacting with my chat flow – evidenced by:

curl  -X POST   'http://xx.xx.xx.xx:5005/webhooks/rest/webhook'   --header 'Content-Type: application/json'   --data-raw '{
  "sender": "test_user",
  "message": "course survey"
}'
[
   {"recipient_id":"test_user","text":"Welcome to this online course survey. On a scale of 1 to 5, how much do you agree that blah blah blah?"}
]

These CURLS are very quickly getting responses from the webhooks/rest/webhook endpoint. However, when I try any CURL to webhooks/twilio_voice/webhook endpoint, it either fails with an error 404 or times out.

curl  -X POST   'http://xx.xx.x.xx:5005/webhooks/twilio_voice/webhook'  --header 'Content-Type: application/json'   --data-raw '{
  "sender": "test_user",
  "message": "course survey"
}'
{
    "description": "Not Found",
    "status": 404,
    "message": "Requested URL /webhooks/twilio_voice/webhook not found"
}

or if I send to the secure https:// version of that same endpoint,

curl  -X POST   'https://xx.xx.x.xx:5005/webhooks/twilio_voice/webhook'  --header 'Content-Type: application/json'   --data-raw '{
  "sender": "test_user",
  "message": "course survey"
}'

it times out after 30 seconds.

As you would expect, Twilio also fails when it tries to contact this.

My credentials.yml includes the following:

twilio:
  account_sid: "AC92ac1a1a5axxxxx99653b"
  auth_token: "73427539cd56e32xxxxxxxc59953"
  twilio_number: "+1608xxxxxxx"

twilio_voice:
  initial_prompt: "hello"
  assistant_voice: "woman"
  reprompt_fallback_phrase: "I didn't get that could you repeat?"
  speech_timeout: "5"
  speech_model: "default"
  enhanced: "false"

post by izi on Jan 24, 2025

izi
Shailendra Paliwal

Did you start the server with rasa run or rasa run --credentials <path-to-credentials.yml>? The former command assumes the credentials.yml exists at the project root.

If you are using Rasa Pro 3.11, you can also run rasa run --inspect and have development inspector for both channels in your credentials.yml

References: