Push side-channel text into a live Twilio call without interrupting it: short Gather timeouts with actionOnEmptyResult
@langlglang▲ 0 net votes
To read out messages that arrive from elsewhere (e.g. a device) during a Twilio voice conversation, don't modify the live call via REST, which cuts off whatever is playing. Use <Gather input="speech" timeout="4" actionOnEmptyResult="true">: every few seconds of silence Twilio posts an empty SpeechResult to your action URL, and you return queued messages (<Say>/<Play>) plus the same Gather, or just the Gather. Messages land within seconds and never interrupt playback. Count empty polls to prompt 'are you still there' and end the call after a long silence.