Skip to content

feat: provider-agnostic telephony integration with Plivo support - #63

Merged
TEJASNARAYANS merged 7 commits into
mainfrom
plivo_integration
Apr 25, 2026
Merged

feat: provider-agnostic telephony integration with Plivo support#63
TEJASNARAYANS merged 7 commits into
mainfrom
plivo_integration

Conversation

@aadhar-EAI

@aadhar-EAI aadhar-EAI commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a full provider-agnostic telephony layer with Plivo as the first supported carrier, designed to be extensible for future providers (Twilio, Telnyx, Exotel, etc.)
  • Introduces org-level telephony configuration, phone number inventory management, outbound calling, voice OTP verification, and number masking capabilities
  • Links telephony phone numbers to agents so they can make and receive calls over PSTN

What's Included

Backend:

  • app/services/telephony/ — Plivo client wrapper, XML helper, and provider-agnostic TelephonyService with outbound calls, OTP verify, number masking, and webhook handling
  • app/api/v1/routes/telephony.py — Full REST API: config CRUD, number sync/list/patch, outbound calls, verify sessions, masking, and Plivo webhooks (answer, events, masking)
  • app/models/database.py / enums.py / schemas.pyTelephonyIntegration, TelephonyPhoneNumber, TelephonyVerifySession, TelephonyMaskedSession models with TelephonyProvider enum
  • app/migrations/016-018 — Three sequential migrations: initial Plivo tables, rename to provider-agnostic schema, add telephony link to agents
  • app/config.py — Plivo global config fields (auth_id, auth_token, verify_app_uuid, webhook_base_url)
  • Agent model extended with telephony_phone_number_id foreign key

Frontend:

  • Telephony provider configuration UI in Integrations page with encrypted credential storage
  • Phone number sync, listing, and agent assignment in agent create/edit forms
  • Provider config display with connection testing

Test plan

  • Create telephony config with Plivo credentials and verify test_connection succeeds
  • Sync phone numbers from Plivo and verify they appear in the number list
  • Assign a phone number to an agent via the edit form
  • Initiate an outbound call via POST /telephony/calls/outbound and verify call is placed
  • Verify answer and event webhooks handle inbound call routing correctly
  • Confirm migrations run cleanly on a fresh database

Made with Cursor

Consolidate telephony as a provider-agnostic integration and wire phone-call agents to telephony numbers with provider selection and fallback custom input. Add telephony playback profiles in voice playground so TTS can be evaluated under narrowband/wideband call conditions.

Made-with: Cursor
Aadhar Singh Bhadauria and others added 5 commits April 24, 2026 13:22
Use an ALTER-based named FK on telephony phone number agent linkage so SQLAlchemy can drop metadata cleanly in tests without circular dependency errors.

Made-with: Cursor
Add backward-compatible persona enum validation for legacy rows and make AgentResponse telephony_phone_number_id optional by default so backend tests pass on current schema fixtures.

Made-with: Cursor
Reintroduce missing auth settings and user auth columns expected by the auth stack after rebase so provider resolution and local-password flows work again in Postgres CI.

Made-with: Cursor
Restore auth API types and session methods used by Login/Profile/authStore so the frontend TypeScript build succeeds in the API Docker image build stage.

Made-with: Cursor
Comment thread EfficientAI-Docs/docs/advanced/database.md
@TEJASNARAYANS
TEJASNARAYANS merged commit e871ef6 into main Apr 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants