Developer Mockup · Voice Registration Agent
Complete specification for building an AI voice agent that registers visitors over a phone call — conversational collection, Aadhaar + OTP verification, pass generation, and SMS/WhatsApp confirmation — using the same backend APIs as the website.
The agent must complete end-to-end visitor registration on an incoming call and behave like a polite government helpdesk executive — never a telemarketer.
Tone and behaviour constraints for prompt / system instructions.
Official Kumbh Mela 2027 Virtual Registration Assistant. Calm, clear, respectful. Speaks short sentences suitable for phone audio. Uses “Namaste” greeting. Confirms before acting. Never rushes or upsells.
Primary: Hindi or English (detect from caller). Keep scripts below as English baseline; localize TTS/prompts as needed. Spell out numbers digit-by-digit when collecting Aadhaar and OTP.
Ordered state machine for the conversation. Orange = AI turns; teal = system / backend actions.
Canonical turns for the agent. Use as prompt examples / TTS scripts. Click a step to preview.
Click through a happy-path mock conversation to validate UX timing and confirmations before coding the real agent.
Same schema for web registration and voice agent — one backend, two channels.
| Field | Source | Notes |
|---|---|---|
| Pass Number | Auto Generated | KM2027-000001 sequential |
| Aadhaar Number | User | Unique · Verhoeff · tokenize at rest |
| Name | Aadhaar / User | Confirm with caller |
| Age | Aadhaar / User | Derived from DOB when available |
| Gender | Aadhaar | Optional eKYC |
| Mobile | OTP Verification | 10-digit Indian format |
| Emergency Contact | User | Must ≠ primary mobile (recommended) |
| State | User | Or country if international |
| Arrival Date | User | Future date only |
| Transport Mode | User | Train / Flight / Bus / Personal Vehicle |
| Stay Type | User | Hotel / Tent City / Akhada / Day Visit |
| Registration Time | System | Server timestamp |
| Status | System | Approved on success |
| QR Code | System | Server-side generation |
Train · Flight · Bus · Personal Vehicle
Hotel · Tent City · Akhada · Day Visit
Illustrative contracts the voice agent tools should call. Align paths with the shared web API.
| Tool | Purpose | Key input |
|---|---|---|
validate_aadhaar | Format + checksum (+ uniqueness check) | aadhaar_number |
send_otp | Dispatch OTP to registered / provided mobile | aadhaar_number | mobile |
verify_otp | Confirm OTP (track attempt count) | session_id, otp |
fetch_aadhaar_profile | Optional eKYC name/gender/DOB | session_id |
create_registration | INSERT visitor · pass · QR · notify | full payload below |
{
{
"aadhaar_number": "XXXXXXXXXXXX",
"name": "Rajesh Kumar",
"age": 34,
"gender": "Male",
"mobile": "98XXXXXXXX",
"emergency_contact": "97XXXXXXXX",
"state": "Uttar Pradesh",
"arrival_date": "2027-01-18",
"transport_mode": "Train",
"stay_type": "Tent City",
"channel": "voice_agent"
}
KM2027-000001
KM2027-000002
KM2027-000003
# Sequential via DB sequence / auto-increment
{
{
"pass_no": "KM2027-000001",
"name": "Rajesh Kumar",
"arrival": "2027-01-18",
"status": "Approved"
}
Prefer encoding only pass_no and resolving details server-side after scan for stronger security.
Shared platform for web + voice. Voice layer plugs into the same registration APIs.
React.js or Next.js — responsive self-service registration
Node.js (NestJS / Express) or Java Spring Boot
PostgreSQL with sequence for pass numbers
OTP via mobile number
UIDAI Aadhaar eKYC where legally authorized
OpenAI Realtime API or Twilio ConversationRelay + Deepgram/Whisper STT + natural TTS
Gov-approved SMS gateway + WhatsApp Business API
Server-side generation embedded in digital pass
NIC Cloud, AWS, Azure, or gov-approved cloud
HTTPS · Aadhaar tokenization · audit logs · RBAC · Indian DPDP + UIDAI compliance
Tick off before handing the agent to QA / UAT.