feat: add warning with missing signature secret

This commit is contained in:
Sabiha Khan 2026-06-29 15:06:00 +05:30
parent f644933e28
commit e1e9782c48
10 changed files with 122 additions and 20 deletions

View file

@ -13,8 +13,8 @@ class VonageConfigurationRequest(BaseModel):
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: str = Field(
...,
signature_secret: Optional[str] = Field(
None,
description="Vonage signature secret used to verify signed webhooks",
)
from_numbers: List[str] = Field(

View file

@ -442,7 +442,7 @@ class VonageProvider(TelephonyProvider):
account_id=claims.get("api_key") or webhook_data.get("account_id"),
from_country=None,
to_country=None,
raw_data={**webhook_data, "signed_claims": claims},
raw_data=webhook_data,
)
@staticmethod
@ -630,13 +630,14 @@ class VonageProvider(TelephonyProvider):
capabilities = app_data.get("capabilities") or {}
voice = capabilities.get("voice") or {}
webhooks = voice.get("webhooks") or {}
backend_endpoint, _ = await get_backend_endpoints()
webhooks["answer_url"] = {
"address": webhook_url,
"http_method": "POST",
}
webhooks["event_url"] = {
"address": f"{webhook_url.rsplit('/inbound/run', 1)[0]}/vonage/events",
"address": f"{backend_endpoint}/api/v1/telephony/vonage/events",
"http_method": "POST",
}
voice["webhooks"] = webhooks