proomt

Search

Search posts, papers, and topics

All posts

TwilioLeroy Chan18 min readtutorialintermediate

On-Demand Masked Sessions with Twilio Proxy, Voice and Serverless

Summary

A step‑by‑step tutorial showing how to build a Just‑in‑Time masked‑call workflow with Twilio Voice, Proxy, and Sync, using a two‑bounce out‑of‑session pattern to collect a tracking code via IVR, resolve the counterpart’s number, stash it in Sync, and auto‑create a Proxy session on the fly—all deployed as Twilio Serverless Functions.

  • Use Twilio Proxy’s out‑of‑session callback to intercept calls on a single reserved number.
  • Collect a 6‑digit tracking code with a `<Gather>` prompt, look up the counterpart via a Sync map, and store the resolved number in a temporary Sync Document (keyed by `res‑<CallSid>`).
  • Redirect the call back to Proxy (second bounce) where the stored resolution is read, the Sync document is deleted, and Proxy auto‑creates the masked session.
  • All logic lives in five Serverless endpoints (`/out-of-session`, `/gather-action`, `/lookup`, etc.) and a small TypeScript helper library for Sync CRUD.

Marketplace and on‑demand services often cannot pre‑assign phone numbers to every participant. This pattern lets a single pool number handle unlimited ad‑hoc connections while preserving privacy, reducing inventory pressure, and keeping the user experience frictionless for couriers or drivers.

6/10

Related reading

  1. How to Connect Your Twilio Agent to External APIs with PHP

    A step‑by‑step tutorial showing how to build a Twilio voice agent in PHP (using OpenSwoole) that calls OpenAI’s gpt‑4o‑mini model and can invoke an external REST API (Cat Facts) via tool‑calling, wiring everything together with Twilio Conversation Relay and a WebSocket server.

    Twiliotwilio.com11 min
  2. Replica-aware routing public beta

    Replica‑aware routing (public beta) lets ClickHouse Cloud users pin a query stream to a specific replica by sending a custom header (HTTP) or overriding the TLS SNI (native). The proxy (Envoy) hashes the tag and consistently forwards all requests with the same tag to that replica, giving read‑after‑write consistency for temporary tables, session objects, and warm replica caches. Stickiness is bes…

    ClickHouseclickhouse.com6 min
  3. Twilio’s 2026 Heightened Awareness Period: Ensuring Reliable Messaging for Peak Season

    Twilio will run two Heightened Awareness Periods (Nov 2‑4 2026 for U.S. midterms and Nov 19 2026‑Jan 4 2027 for BFCM/holiday) to shift high‑volume short‑code and toll‑free traffic to market‑throughput mode, keeping messages out of carrier queues. Most users need no action; high‑volume senders should contact their account team and complete supplemental order forms by the listed deadlines to lock i…

    Twiliotwilio.com3 minrelease
  4. Elastic announces GA of cross-project search on Serverless, enabling teams to query across all linked projects without moving a byte

    Elastic Cloud Serverless now offers General Availability of Cross‑Project Search (CPS), letting you run a single query across up to 100 linked projects (any region, cloud, or solution type) without moving data. Setup is UI‑driven, permissions are evaluated per‑project, and costs are $0.009 / GB retained plus $0.05 / GB egress. CPS works for Observability, Security, Search, vector DB, and ML jobs,…

    Elasticelastic.co6 minrelease