dograh/api/services/telephony/providers/vonage/config.py
Sabiha Khan d9800fddd6
feat: support inbound vonage calls (#480)
* feat: support inbound vonage calls

* fix: drift check

* feat: add warning with missing signature secret

* docs: vonage inbound steps

* chore: upgrade pipecat submodule
2026-06-29 16:27:19 +05:30

35 lines
1.2 KiB
Python

"""Vonage telephony configuration schemas."""
from typing import List, Literal, Optional
from pydantic import BaseModel, Field
class VonageConfigurationRequest(BaseModel):
"""Request schema for Vonage configuration."""
provider: Literal["vonage"] = Field(default="vonage")
api_key: str = Field(..., description="Vonage API Key")
api_secret: str = Field(..., description="Vonage API Secret")
application_id: str = Field(..., description="Vonage Application ID")
private_key: str = Field(..., description="Private key for JWT generation")
signature_secret: Optional[str] = Field(
None,
description="Vonage signature secret used to verify signed webhooks",
)
from_numbers: List[str] = Field(
default_factory=list,
description="List of Vonage phone numbers (without + prefix)",
)
class VonageConfigurationResponse(BaseModel):
"""Response schema for Vonage configuration with masked sensitive fields."""
provider: Literal["vonage"] = Field(default="vonage")
application_id: str # Not sensitive, can show full
api_key: str # Masked
api_secret: str # Masked
private_key: str # Masked
signature_secret: Optional[str] = None # Masked
from_numbers: List[str]