Getting Started
Welcome to SFVoPI (Superfone Voice over Programmable Interface) — a powerful programmable voice API that lets you build voice applications with ease. Think of it as Twilio Voice for the Superfone platform.
What is SFVoPI?
SFVoPI enables you to:
- Make and receive phone calls programmatically via REST API
- Control call flow using webhooks and real-time events
- Stream audio in real-time over WebSocket for AI voice agents, transcription, or custom audio processing
- Manage VoIP numbers and link them to your applications
Whether you're building an AI voice assistant, IVR system, call center solution, or any voice-enabled application, SFVoPI provides the building blocks you need.
Key Concepts
Apps
An App is a container for your voice application logic. Each app has:
- Webhook URLs that Superfone calls when events occur (incoming call, call answered, call ended)
- HTTP methods (GET or POST) for webhook delivery
- Fallback URLs for redundancy if primary webhooks fail
Apps define how calls should be handled when they arrive.
Numbers
Numbers are VoIP phone numbers that you link to your apps. When someone calls a number linked to your app, Superfone triggers your app's webhook URLs to determine what happens next.
- Numbers use E.164 format (e.g.,
+918000000001) - Each number can be linked to one app at a time
- You can link multiple numbers to the same app
Calls
Calls represent active or completed phone call sessions. You can:
- Initiate outbound calls via API
- Receive inbound calls on your linked numbers
- Track call status (ringing, in-progress, completed, failed)
- Access call metadata (duration, timestamps, hangup cause)
Webhooks
Webhooks are HTTP callbacks that Superfone sends to your server when call events occur:
- Answer webhook — Triggered when a call is answered (inbound or outbound)
- Hangup webhook — Triggered when a call ends
Your webhook endpoints return JSON instructions telling Superfone what to do next (e.g., stream audio, play message, hang up).
Audio Streaming
Audio Streaming lets you receive and send real-time audio over WebSocket during active calls. Use cases include:
- AI voice agents (speech-to-text, LLM processing, text-to-speech)
- Live transcription and sentiment analysis
- Custom audio processing (noise reduction, voice effects)
Streams support multiple codecs (PCMU, PCMA) and sample rates (8kHz, 16kHz).
Architecture Overview
Here's how SFVoPI fits into your application:
Flow:
- Your server creates an app via REST API with webhook URLs
- You link a VoIP number to the app
- When a call arrives, Superfone sends an HTTP request to your answer webhook
- Your webhook responds with instructions (e.g., "stream audio to this WebSocket URL")
- Superfone establishes a WebSocket connection and streams audio bidirectionally
- When the call ends, Superfone sends an HTTP request to your hangup webhook
Prerequisites
Before you start building with SFVoPI, you'll need:
- API Key — Contact the Superfone team to get your API key (self-service provisioning coming soon)
- Publicly accessible server — Your webhook URLs must be reachable from the internet
- For local development, use tools like ngrok or localtunnel
- Basic understanding of webhooks — Familiarity with HTTP callbacks and request/response patterns
- WebSocket knowledge (optional) — Required only if you plan to use audio streaming
Next Steps
Ready to build your first voice application?
- Authentication — Learn how to authenticate API requests
- API Overview — Understand request/response formats and conventions
- Quickstart Tutorial — Build your first voice app in 10 minutes
- Apps API — Create and manage voice applications
- Numbers API — Link phone numbers to your apps
- Calls API — Initiate and manage calls
Support
Need help? Have questions?
- Email: hello@superfone.in
- Documentation: You're already here!