Custom AI Call Summary System

Technical Architecture & Project Plan

Client: Taleb Alashkar | End Client: Law Firm (5-20 Staff)
Prepared by: Faizan Ali | June 6, 2026

1. Project Overview

A production-grade automated system that replaces RingCentral's generic call summaries with structured, AI-generated summaries tailored for a law firm. The system detects call completion, fetches the transcript from RingCentral, classifies the call type using AI, generates a structured summary, and delivers it via email and Microsoft Teams within 10-15 minutes.

Key Constraints

2. System Architecture

The system consists of five layers:

LayerFunctionDescription
1. Event DetectionCall triggerRingCentral webhook notifies Django when a call ends
2. Ingestion & ProcessingAsync pipelineFetches transcript from RingCentral, classifies via AI, generates structured summary
3. StoragePersist dataPostgreSQL for summaries/templates/audit. Blob Storage for audio (30-day retention).
4. DeliveryNotify staffEmail (Azure Communication Services) + Teams (Incoming Webhook) in parallel
5. User InterfaceStaff + AdminStaff portal: view/search/correct summaries. Admin panel: manage templates.

Pipeline Flow

Call Ends → Webhook → Async Task → Fetch Transcript (RingCentral API) → Classify (AI) → Summarize (AI) → Render Template → Save → Deliver (Email + Teams)

3. Technology Stack

Backend

ComponentTechnologyPurpose
LanguagePython 3.12+Primary backend
Web FrameworkDjango 6+Application framework
REST APIDjango REST FrameworkAPI for frontend
Task QueueDjango-Q2Async tasks (PostgreSQL broker — no Redis)
ValidationPydantic 2.xAI output validation
Authdjango-allauthEntra ID SSO
Auditdjango-auditlogAutomatic audit trails

AI Engine Options

The system supports multiple AI providers and can swap with minimal code changes:

OptionProviderModelBest For
A (Recommended)OpenAI DirectGPT-5.4Best balance of cost, performance, and simplicity. Fast API, mature tooling.
BAzure OpenAIGPT-5.4Strongest compliance. Data in firm's tenant. Zero Data Retention available.
CGoogle GeminiGemini 2.5 ProCompetitive pricing. Requires Google DPA review.
DAnthropic ClaudeOpus / SonnetStrong reasoning. AWS Bedrock for enterprise controls.

Recommendation: OpenAI Direct (Option A) for the best balance of cost and performance. Can upgrade to Azure OpenAI later if stricter compliance is needed.

Frontend

ComponentTechnologyPurpose
FrameworkNext.js 16Staff web portal
UIshadcn/ui + Tailwind CSSModern, accessible components
AuthAuth.js + Entra IDStaff SSO

Infrastructure

ComponentTechnologyPurpose
CloudMicrosoft AzureFirm's own tenant
CI/CDGitHub ActionsAutomated deployments
MonitoringApplication InsightsPerformance + alerting

4. Azure Infrastructure & Monthly Cost

Option A: Standard (Recommended)

ServiceTierPurposeCost/mo
Production VMB2ms (2 vCPU, 8 GB RAM)Django + async worker$60.74
Staging VMB2s (2 vCPU, 4 GB RAM)Testing + QA environment$30.37
PostgreSQL FlexibleBurstable B1msDatabase + task broker$16.09
OpenAI APIPay-as-you-goClassification + summarization$8-25
Blob StorageStandard LRS HotAudio (30-day)$0.50
Static Web AppsFreeNext.js frontend$0.00
Communication ServicesPay-as-you-goEmail delivery$0.38
Key VaultStandardSecrets$0.03
Application InsightsFreeMonitoring$0.00
TOTAL$116-133

Option B: Performance

ServiceTierPurposeCost/mo
Production VMB4ms (4 vCPU, 16 GB RAM)Django + async worker$121.47
Staging VMB2ms (2 vCPU, 8 GB RAM)Testing + QA environment$60.74
PostgreSQL FlexibleBurstable B2sDatabase + task broker$32.18
OpenAI APIPay-as-you-goClassification + summarization$8-25
Blob StorageStandard LRS HotAudio (30-day)$0.50
Static Web AppsFreeNext.js frontend$0.00
Communication ServicesPay-as-you-goEmail delivery$0.38
Key VaultStandardSecrets$0.03
Application InsightsFreeMonitoring$0.00
TOTAL$223-241

5. Feature Breakdown & Hour Estimates

#FeatureHoursKey Details
1Transcript Ingestion16-22Webhook + fetch transcript via RC API + fallback to audio transcription
2Secure Storage6-9Django models + PostgreSQL + Blob + encryption
3Template Engine12-165 templates: Intake, Case Update, Counsel, Court, Internal
4AI Summarization18-22Prompt engineering + classification + validation
5Staff Web Interface14-19Summary list/detail/edit, search, SSO
6Email Delivery8-12Azure Comm Services + HTML templates + tracking
7Teams Delivery10-14Incoming Webhooks + Adaptive Cards
8Admin Template Editor14-20Custom Next.js admin panel + rich text editor + template CRUD + live preview
9Audit Logging4-7django-auditlog + pipeline logging
10Security Hardening7-11Entra ID + RBAC + Key Vault + validation
11Deployment & Config12-16CI/CD + monitoring + environment setup
Subtotal121-168
Integration Testing10-14
UAT + Bug Fixes10-16
Project Management12-16
GRAND TOTAL153-214

* Hours estimated with AI-assisted development.

Timeline

ScenarioDuration
1 developer4-5 weeks

6. Platform Compliance — No CASA Audit Required

Google requires apps that access user data to pass a CASA (Cloud Application Security Assessment) — a third-party security audit that can take weeks to months and cost $4,500-$75,000+. This applies to any app using Google OAuth with sensitive or restricted scopes.

Microsoft has no equivalent gate. Since this system is deployed as a single-tenant app within the law firm's own Azure tenant, the firm's IT admin simply grants consent directly. No external verification, no security assessment, no audit, no yearly revalidation.

FactorGoogle (CASA)Microsoft (Our Path)
OAuth VerificationRequiredNOT required (single-tenant)
Security AssessmentCASA audit (weeks/months, $4,500+)None
External AuditRequiredNOT required
Approval TimelineWeeks to monthsInstant (admin consent)
Yearly RevalidationAnnual re-assessmentNone

As of June 2026, Microsoft has no equivalent security assessment requirement for single-tenant applications.

References:
Google CASA requirement: appdefensealliance.dev/casa
Microsoft single-tenant consent: learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent

Summary

MetricValue
Total Hours153 - 214 hours
Hourly Rate$38/hour
Total Project Cost$5,814 - $8,132
Timeline4 - 5 weeks
Monthly Azure Cost (Standard)$116 - $133
Monthly Azure Cost (Performance)$223 - $241
Cost per Call (AI)~$0.015 *

* Each call requires two OpenAI API calls (classification + summarization). A typical 10-30 min call produces ~1,500-4,000 tokens of transcript. At GPT-5.4 pricing (~$2.50/1M input, ~$10/1M output), the average AI cost per call is ~$0.015. At 20 calls/day this is ~$9/mo, at 50 calls/day ~$22/mo.


Prepared by Faizan Ali