feat: migrate SMS/voice to Telnyx (TeXML), keep browser dial pad on Twilio
Twilio now handles only the in-browser dial pad (Access Token + browser-Device outbound TwiML); Telnyx takes over SMS, inbound voicemail, the AI voice conversation loop, and staff-triggered outbound calls via TeXML. Adds TelnyxSettings model, Communication.provider discriminator, new comms/routes modules, and a real Telnyx Settings page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "CommunicationProvider" AS ENUM ('twilio', 'telnyx');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "communications" ADD COLUMN "provider" "CommunicationProvider" NOT NULL DEFAULT 'twilio';
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "telnyx_settings" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"userId" INTEGER NOT NULL,
|
||||
"apiKey" TEXT NOT NULL,
|
||||
"phoneNumber" TEXT NOT NULL,
|
||||
"texmlApplicationId" TEXT,
|
||||
"messagingProfileId" TEXT,
|
||||
"webhookPublicKey" TEXT,
|
||||
"greetingMessage" TEXT,
|
||||
|
||||
CONSTRAINT "telnyx_settings_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "telnyx_settings_userId_key" ON "telnyx_settings"("userId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "telnyx_settings" ADD CONSTRAINT "telnyx_settings_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "telnyx_settings" ADD COLUMN "accountSid" TEXT;
|
||||
Reference in New Issue
Block a user