<aside> 📞
Click-to-Call Integration
</aside>
Click-to-Call lets your application place a call for a user: it rings the user's phone first, and when they answer, connects them to the number you asked for. There are two ways to integrate, and both are supported:
One request places the call. No session cookies or redirects to manage.
curl -X POST '<https://call.vaspian.com/v1/call>' \
-H 'content-type: application/json' \
-d '{"did":"2125551000","ext":"100","pin":"****","to":"(212) 555-1212"}'
Response:
{"ok":true,"status":"submitted","ext":"100","to":"+12125551212","message":"Ringing ext 100; answer to connect to +12125551212"}
Send a JSON body (content-type: application/json) to POST <https://call.vaspian.com/v1/call>.
did — Any phone number on your Vaspian account (10 digits; formatting is ignored). Use this or tenant.tenant — Your tenant web name, e.g. sandbox. Case-sensitive. Use this or did.ext — The extension placing the call. Its phone rings first.pin — That extension's PIN (the one used to sign in to the Vaspian portal).to — The number to call: a 10-digit US/Canada number in any format, or an internal extension. You don't need to add an outbound prefix; the API adds it.prefix (optional) — 9 (default) or 8. Use 8 only if Vaspian has set you up for Dynamic Caller ID.<aside> 📱
Call Flow: The extension's default click-to-call phone (set in the Vaspian portal under My Phones) rings first. When it's answered, the call connects to the to number.
</aside>