programming insights required.
You will probably get more or better responses posting this type of question on a forum for software developers like stackexchange because the people who actually know the answer to your question are most likely people who work at this company or used to work here, who might have signed an NDA that prevents them from giving away company secrets or any information that might be sensitive in one way or another. Given that it's better to be safe than sorry, this type of information might fall under that category. My assumption could be wrong but if I was the owner or even an employee, I see zero benefit to answer this question because without a much larger discussion, the information won't even be useful to you.
Great question — this touches on telephony API architecture, which is a fascinating area especially for anyone building or integrating with platforms like this.
Here's how the call flow typically works under the hood for a platform like Clarity:
1. The Infrastructure Layer: Cloud Telephony APIs
Platforms like Clarity typically use telephony service providers such as Twilio, Bandwidth, or Vonage (formerly Nexmo). These providers offer:
- Virtual/geographic phone numbers (the "geo numbers" you mention) in many countries
- Programmable voice APIs that handle call routing, recording, and billing
- PIN-based call bridging to connect two parties dynamically
2. How the Call Gets Routed
When you dial the geo number and enter a PIN, here's what happens behind the scenes:
- Your call hits the telephony provider's infrastructure (e.g., a Twilio phone number)
- The provider sends a webhook (HTTP POST) to Clarity's backend with details like your caller ID, the number dialed, and timestamp
- Clarity's backend looks up the PIN in its database to identify the session (which expert, which scheduled call, which caller)
- The backend responds with TwiML (Twilio Markup Language) or equivalent instructions: "Connect this caller to [Expert's number]" or place them in a conference bridge
- The second party (the expert) is called out simultaneously or is already waiting in the bridge
- Both parties are connected via the telephony provider's infrastructure
3. How Minutes Are Recorded
- The telephony provider tracks call start and end times with millisecond precision
- When the call ends, the provider sends another webhook to Clarity's backend with the call duration
- Clarity's backend records this duration in its database, tied to the session/expert/caller
- This feeds directly into the billing engine
4. How Billing Is Produced
- The expert's per-minute rate is stored in the platform database
- Duration (in minutes) x rate = call cost
- Clarity handles payment processing separately (typically via Stripe or similar)
- The caller's card is charged, and the expert's earnings are queued for payout
- The telephony provider separately bills Clarity for the underlying call minutes at wholesale rates
5. The Recording Component
If calls are recorded, the telephony API handles that too — recordings are stored in the provider's cloud (e.g., Twilio's recording storage) and a URL/reference is saved in Clarity's database. These can be retrieved via API.
In summary, the entire flow is orchestrated through webhooks, APIs, and a backend state machine that ties together session management, call routing, duration tracking, and billing in real time.
If you're building something similar or integrating telephony into your platform, happy to discuss the architecture in more detail — feel free to reach out.