0

Is there a way to obtain or get the Flow & Execution Context within a Function that is called via Webhook / Web Hook within Twilio when a Call Ends? In the Function, there is the Event Object which does contain data about the call including the "CallSid", but nothing about the Flow that I can see.

1 Answers1

0

The Twilio Function doesn't know anything about Studio, so you need to send that data into the Twilio Function using GET/POST data or via the Run Function Widget Function Parameters.

Alan
  • 10,465
  • 2
  • 8
  • 9
  • OKI, but again, the issue in our scenario is that we are using the Status Callback Webhook on a given Phone Number, so that when a Call is completed, that the Webhook calls the Function, but we are unable to find a way to pass any Flow values (Sid) to the Function via the URL.... – Staylor Nov 05 '20 at 19:57
  • You really should have the statusCallback set to the Studio Flow, to prevent stuck executions. Understanding and Avoiding Stuck Executions in Twilio Studio - https://support.twilio.com/hc/en-us/articles/360019383714-Understanding-and-Avoiding-Stuck-Executions-in-Twilio-Studio `Important: For Voice Flows, add the Studio Flow Webhook URL to both the Call Status Changes and the Primary Handler Fails fields to ensure Studio can always correctly detect the end of the call.`. What is the objective? – Alan Nov 05 '20 at 22:17