22 lines
626 B
Python
22 lines
626 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
class Settings(BaseSettings):
|
|
# Load settings from the .env file
|
|
model_config = SettingsConfigDict(env_file="../.env", env_file_encoding='utf-8')
|
|
|
|
# VoIP.ms Credentials
|
|
voipms_api_username: str
|
|
voipms_api_password: str
|
|
|
|
# Target DID and Destinations
|
|
target_did: str
|
|
target_sip_account: str
|
|
target_cellphone_1: str
|
|
target_cellphone_2: str
|
|
|
|
# VoIP.ms API endpoint
|
|
voipms_api_url: str = "https://voip.ms/api/v1/rest.php"
|
|
|
|
|
|
# Create a single instance of the settings to be used throughout the app
|
|
settings = Settings() |