Healthcare
Embedded Voice for practices, clinics, and specialty-health SaaS.
Pattern: Screen Pop on the patient chart
Minimal webhook handler
app.post('/webhooks/dialstack', express.raw({ type: 'application/json' }), async (req, res) => {
verifySignature(req);
const event = JSON.parse(req.body);
if (event.type === 'call.incoming') {
const patient = await db.patients.findOne({ phone: event.data.from_number });
if (patient) {
// push to the clinician's open browser tab via your realtime channel
pusher.trigger(`user-${event.data.user_id}`, 'screen-pop', {
patientId: patient.id,
lastVisit: patient.last_visit,
callId: event.data.call_id,
});
}
}
res.status(200).end();
});
The webhook is fire-and-forget — respond 200 fast. See Screen Pop for the full pattern, including the frontend-only variant using the SSE event stream.
Pattern: AI Scheduling for after-hours booking
Route closed-hours calls to a Voice App that takes the call, collects the booking request and calls your availability / booking APIs back.
await ds.dialPlans.create(
{
name: 'Main line',
entry_node: 'hours',
nodes: [
{
id: 'hours',
type: 'schedule',
config: { schedule: businessHours.id, open: 'ring_front_desk', closed: 'ai_book' },
},
{ id: 'ring_front_desk', type: 'ring_all_users', config: { timeout: 30, next: 'ai_book' } },
{ id: 'ai_book', type: 'voice_app', config: { voice_app: bookingAgent.id } },
],
},
{ dialstackAccount: account.id }
);
businessHours is a schedule from the Schedules API. The booking agent, bookingAgent, is a Voice App configured with your availability + booking endpoints. Full flow: AI Scheduling.
HIPAA notes
Which parts of a call are encrypted in transit depends on how the call is carried: softphones always are, desk phones only on the TLS transport, and calls to and from the phone network are not. Recordings and voicemails are encrypted at rest, a BAA is available on request, and new accounts start with recording and transcription off. See Security & encryption for the details, including how to turn recording on.
Build this with DialStack
- Screen Pop — pop the patient chart on first ring.
- Activity Logging — write every call to the patient record.
- Click-to-Call — outbound from the chart.
- AI Scheduling — native booking over voice, synced back to your calendar.