1234curl -X POST "https://voice.ruut.chat/2010-04-01/Accounts/$RUUT_ACCOUNT_SID/IncomingPhoneNumbers/$NUMBER_SID" \ -u "$RUUT_ACCOUNT_SID:$RUUT_AUTH_TOKEN" \ --data-urlencode "VoiceUrl=https://app.example.com/twiml/inbound" \ --data-urlencode "VoiceMethod=POST"
123<Response> <Say voice="alice" language="en-NG">Thanks for calling!</Say> </Response>
12345import { VoiceResponse } from "@ruut/voice-sdk"; const xml = new VoiceResponse() .say("Thanks for calling!", { voice: "alice", language: "en-NG" }) .toXml();
<Gather> and <Say> to collect a digit and route the caller:123456<Response> <Gather numDigits="1" action="/twiml/menu" method="POST"> <Say>Press 1 for sales. Press 2 for support.</Say> </Gather> <Say>We did not receive any input. Goodbye.</Say> </Response>
action URL is requested with the gathered digits (as Digits) when the caller finishes. Route on them however you like.123<Response> <Dial>+2348000000009</Dial> </Response>
12345<Response> <Dial record="record-from-answer-dual"> <Conference startConferenceOnEnter="true">support-room</Conference> </Dial> </Response>
<Record> to capture a message, or record a bridged call with <Dial record="…">. See the recording guide for full details.<Response>. When building with the SDK, call .toXml() on the VoiceResponse object (not on a sub-builder like dial), or the response will be rejected.