Quickstart
Make your first call with Ruut Voice in under five minutes. You'll need a carrier account with an available phone number and API credentials.
1. Get your credentials
Log in to the dashboard, open the Account Settings page for your carrier, and copy the Account SID and Auth Token. These authenticate every API request.
2. Install the SDK
Ruut Voice ships a typed TypeScript SDK with a server client and a browser softphone. Or use plain curl — the REST API is standard.
npm install @ruut/voice-sdkimport { RuutVoice } from "@ruut/voice-sdk";
const client = new RuutVoice({
accountSid: process.env.RUUT_ACCOUNT_SID,
authToken: process.env.RUUT_AUTH_TOKEN,
baseUrl: "https://voice.ruut.chat",
});3. Make your first call
Create an outbound call with inline TwiML. The call answers and reads a greeting:
import { VoiceResponse } from "@ruut/voice-sdk";
const twiml = new VoiceResponse()
.say("Hello from Ruut Voice!")
.toXml();
const call = await client.calls.create({
to: "+2348000000001",
from: "+2348000000002",
twiml,
statusCallback: "https://app.example.com/calls/status",
});
console.log(call.sid, call.status); // CA… queuedThe same request with curl:
curl -X POST "https://voice.ruut.chat/2010-04-01/Accounts/$RUUT_ACCOUNT_SID/Calls" \
-u "$RUUT_ACCOUNT_SID:$RUUT_AUTH_TOKEN" \
--data-urlencode "To=+2348000000001" \
--data-urlencode "From=+2348000000002" \
--data-urlencode "Twiml=Hello from Ruut Voice! "4. Receive an inbound call
Buy a number in the dashboard and set its Voice URL to an endpoint on your server that returns TwiML. When someone calls the number, Ruut Voice fetches that URL and executes the returned TwiML:
Thanks for calling Ruut Voice!
Build the same response with the SDK:
import { VoiceResponse } from "@ruut/voice-sdk";
const response = new VoiceResponse()
.say("Thanks for calling Ruut Voice!", { voice: "alice" })
.toXml();5. Receive status callbacks
Every call can push status updates to your server. Set statusCallback on the call (or on the incoming number) and verify the signature before trusting it:
import { parseWebhook, validateWebhookSignature } from "@ruut/voice-sdk";
const valid = await validateWebhookSignature({
url: "https://app.example.com/calls/status",
params: req.body,
signature: req.headers["x-twilio-signature"],
authToken: process.env.RUUT_AUTH_TOKEN,
});
if (!valid) return res.status(403).end();
const payload = parseWebhook(req.body);
if (payload.CallStatus === "completed") {
console.log("Call", payload.CallSid, "completed");
}