INNER CODE UNIT · Python
main
arnonym/ha-plugins · ha-sip/src/main.py:85
def main():
global_options = options_global.parse_global_options(config.GLOBAL_OPTIONS)
name_server = get_name_server(config.NAME_SERVER)
cache_dir = get_cache_dir(config.CACHE_DIR)
endpoint_config = sip.MyEndpointConfig(
port=utils.convert_to_int(config.PORT, 5060),
log_level=utils.convert_to_int(config.LOG_LEVEL, 5),
name_server=name_server,
global_options=global_options,
)
account_configs = {
1: account.MyAccountConfig(
enabled=config.SIP1_ENABLED.lower() == 'true',
index=1,
id_uri=config.SIP1_ID_URI,
registrar_uri=config.SIP1_REGISTRAR_URI,
realm=config.SIP1_REALM,
user_name=config.SIP1_USER_NAME,