Number Masking

How to Build Two-Way Number Masking with the Session API (2026)

A developer guide to session-based number masking: bind two numbers to one virtual number with a single API call, route calls dynamically from your own server, and receive lifecycle events. Code samples included.

Edesy Team6 min read

Frequently asked questions

What is session-based number masking?

Session-based number masking binds two real phone numbers to a single virtual number for a limited lifetime. Either party can call the virtual number and is bridged to the other, with routing decided by who is calling. When the order or ride ends, the session expires and the number is freed for reuse. It is the two-way alternative to one-shot click-to-call bridging.

How do I connect two numbers with the number masking API?

Send a POST request to /masking/sessions with party_a, party_b, and an optional reference and expiry_minutes. The API returns a virtual_number that you give to both parties. Either party can then call that number until the session expires or you end it.

Is the create-session call idempotent?

Yes. Create is idempotent on your reference id (an order, ride, or ticket id). Repeating the call for an active reference returns the existing session instead of allocating a new number, so retries and duplicate events are safe.

Can I decide who a masked number connects to at call time?

Yes, with the dynamic routing webhook. Point a masked number at your HTTPS endpoint, and when a call arrives the platform sends you a signed masking.route request; your endpoint replies with the number to connect to, or rejects the call. This is useful for round-robin agent routing, time-based routing, and blocking abuse.

Does number masking support SMS?

No. Edesy number masking is voice-only today — it masks phone calls between two parties. Numbers are 10-digit Indian mobiles, billed at Rs 1.50 per masked minute on a prepaid wallet.

Edesy Team

The Edesy engineering team, building voice AI, messaging, and automation products for Indian businesses.

Published

Share

Number MaskingAPITelephonyPrivacyIndiaDevelopersWebhooks
Back to blog