Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🔧(frontend) add telephony feature configuration from backend

lebaudantoine70d250cc9c00
diff --git a/src/backend/core/api/__init__.py b/src/backend/core/api/__init__.py
index 6c60ee29..aaebdc55 100644
--- a/src/backend/core/api/__init__.py
+++ b/src/backend/core/api/__init__.py
@@ -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)
diff --git a/src/backend/meet/settings.py b/src/backend/meet/settings.py
index af32fa63..61801b5a 100755
--- a/src/backend/meet/settings.py
+++ b/src/backend/meet/settings.py
@@ -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
diff --git a/src/frontend/src/api/useConfig.ts b/src/frontend/src/api/useConfig.ts
index 2a32097a..9b96c2c2 100644
--- a/src/frontend/src/api/useConfig.ts
+++ b/src/frontend/src/api/useConfig.ts
@@ -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
}