🔧(frontend) add telephony feature configuration from backend

Pass telephony service availability and settings to frontend to enable
conditional UI rendering based on SIP functionality status.
This commit is contained in:
lebaudantoine
2025-07-01 23:07:48 +02:00
committed by aleb_the_flash
parent 988e5aa256
commit 70d250cc9c
3 changed files with 22 additions and 0 deletions

View File

@@ -42,6 +42,13 @@ def get_frontend_configuration(request):
"available_modes": settings.RECORDING_WORKER_CLASSES.keys(),
"expiration_days": settings.RECORDING_EXPIRATION_DAYS,
},
"telephony": {
"enabled": settings.ROOM_TELEPHONY_ENABLED,
"phone_number": settings.ROOM_TELEPHONY_PHONE_NUMBER
if settings.ROOM_TELEPHONY_ENABLED
else None,
"default_country": settings.ROOM_TELEPHONY_DEFAULT_COUNTRY,
},
}
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
return Response(frontend_configuration)

View File

@@ -609,6 +609,16 @@ class Base(Configuration):
environ_name="ROOM_TELEPHONY_PIN_MAX_RETRIES",
environ_prefix=None,
)
ROOM_TELEPHONY_PHONE_NUMBER = values.Value(
None,
environ_name="ROOM_TELEPHONY_PHONE_NUMBER",
environ_prefix=None,
)
ROOM_TELEPHONY_DEFAULT_COUNTRY = values.Value(
"US",
environ_name="ROOM_TELEPHONY_DEFAULT_COUNTRY",
environ_prefix=None,
)
# pylint: disable=invalid-name
@property

View File

@@ -30,6 +30,11 @@ export interface ApiConfig {
available_modes?: RecordingMode[]
expiration_days?: number
}
telephony: {
enabled: boolean
phone_number?: string
default_country?: string
}
manifest_link?: string
}