Skip to content

IVR Data and Integrations ​

MongoDB collection ​

The configured dmind-ivr MongoDB database contains one application collection: interview.

Important embedded structures:

  • result_ai.two_q_plus: sad, boredom, and suicidal_thought booleans.
  • result_ai.suicidal: score, level, and display detail.
  • result_ai.chief_complaint.sad: classified complaint terms.
  • timestamps[]: call step, optional choice, and client-provided timestamp.

The recent-severe query filters phone_number and created_at >= now - 1 day, sorted newest first.

Redis session ​

Key pattern: session:<session_id>.

The JSON value contains:

FieldPurpose
interview_idMongo interview _id.
prediction_idAI controller prediction UUID.
final_question_submittedUTC timestamp used for AI-duration measurement.
timestamp_countPer-session call-progress counter used by rate limiting.

Redis loss expires active sessions and prevents subsequent authenticated route calls, but durable Mongo records remain.

External dependencies ​

DependencyDirectionContract
IVR caller applicationInboundSends access key, stable session_id, call timestamps, MP3 answers, and result polling.
AI controllerOutbound/prediction, /submit-answer, and /result. Open the AI pipeline →.
MongoDB AtlasRead/writeDurable interview, call-progress, fallback, AI-result, and feedback data.
ElastiCache RedisRead/writeActive session-to-interview/prediction mapping and TTL state.
CloudWatch MetricsWriteBuffered RESPONSE_COUNT and AI_DURATION metrics.
CloudWatch LogsWriteStructured application and request logs from ECS.