🔧(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:
committed by
aleb_the_flash
parent
988e5aa256
commit
70d250cc9c
@@ -42,6 +42,13 @@ def get_frontend_configuration(request):
|
|||||||
"available_modes": settings.RECORDING_WORKER_CLASSES.keys(),
|
"available_modes": settings.RECORDING_WORKER_CLASSES.keys(),
|
||||||
"expiration_days": settings.RECORDING_EXPIRATION_DAYS,
|
"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)
|
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
|
||||||
return Response(frontend_configuration)
|
return Response(frontend_configuration)
|
||||||
|
|||||||
@@ -609,6 +609,16 @@ class Base(Configuration):
|
|||||||
environ_name="ROOM_TELEPHONY_PIN_MAX_RETRIES",
|
environ_name="ROOM_TELEPHONY_PIN_MAX_RETRIES",
|
||||||
environ_prefix=None,
|
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
|
# pylint: disable=invalid-name
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ export interface ApiConfig {
|
|||||||
available_modes?: RecordingMode[]
|
available_modes?: RecordingMode[]
|
||||||
expiration_days?: number
|
expiration_days?: number
|
||||||
}
|
}
|
||||||
|
telephony: {
|
||||||
|
enabled: boolean
|
||||||
|
phone_number?: string
|
||||||
|
default_country?: string
|
||||||
|
}
|
||||||
manifest_link?: string
|
manifest_link?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user