Add voice name flow controls and analytics

This commit is contained in:
Yera All
2026-04-05 03:26:18 +05:00
parent d15fcf7129
commit d959c2b2f0
31 changed files with 6410 additions and 152 deletions
+19
View File
@@ -120,6 +120,15 @@ class Queue(Base):
created_at: Mapped[str] = mapped_column(String(64))
class VoiceNameCollectionSettingsRow(Base):
__tablename__ = "voice_name_collection_settings"
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
settings_key: Mapped[str] = mapped_column(String(64), unique=True, index=True)
config_json: Mapped[str] = mapped_column(Text, default="{}")
updated_at: Mapped[str] = mapped_column(String(64), index=True)
class RoutingCounter(Base):
__tablename__ = "routing_counters"
@@ -225,6 +234,11 @@ class AsteriskCallLinkRow(Base):
ai_state: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
ai_handoff_reason: Mapped[str | None] = mapped_column(Text, nullable=True)
ai_last_model_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
voice_start_language: Mapped[str | None] = mapped_column(String(16), nullable=True, index=True)
customer_name_status: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
customer_name_value: Mapped[str | None] = mapped_column(String(256), nullable=True)
customer_name_source: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
customer_name_resolved_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
started_at: Mapped[str] = mapped_column(String(64), index=True)
connected_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
ended_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
@@ -396,6 +410,11 @@ class VoiceAISessionRow(Base):
status: Mapped[str] = mapped_column(String(32), index=True, default="queued")
handoff_reason: Mapped[str | None] = mapped_column(Text, nullable=True)
handoff_target_queue_id: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
voice_start_language: Mapped[str | None] = mapped_column(String(16), nullable=True, index=True)
customer_name_status: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
customer_name_value: Mapped[str | None] = mapped_column(String(256), nullable=True)
customer_name_source: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
customer_name_resolved_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
media_uuid: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
media_status: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
media_connected_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)