[Use server learned conference domain Adrian Georgescu **20261010100431 Ignore-this: 3babf17c8cca271ffdeca8b98efbeaa2338a723e9ff819c387beb5c800f6abbe791ae9011c0403a5 ] hunk ./blink/pstn_normalize.py 401 - server = str(getattr(account.conference, 'server_address', '') or '').strip().lower() + server = str(getattr(account.server, 'conference_server', '') or '').strip().lower() hunk ./blink/sessions.py 7182 + # under the buttons: what conferencing needs + self.requirements_label = QLabel(translate('conference_dialog', 'Conferencing requires a server running MSRP switch RFC 7701. ' + 'You can deploy a free server from sylkserver.com'), self) + self.requirements_label.setWordWrap(True) + self.requirements_label.setTextFormat(Qt.TextFormat.RichText) + self.requirements_label.setOpenExternalLinks(True) + self.requirements_label.setForegroundRole(QPalette.ColorRole.PlaceholderText) + font = self.requirements_label.font() + if font.pointSizeF() > 0: + font.setPointSizeF(font.pointSizeF() * 0.9) + self.requirements_label.setFont(font) + self.grid_layout.addWidget(self.requirements_label, 4, 0, 1, 2) hunk ./blink/sylk_discovery.py 16 -For now the settings are only shown in the activity log: in full the first -time, then what changed. SylkServerConfigurationDidChange is posted with them +The settings are shown in the activity log: in full the first time, then what +changed. conference.sipBridge, the domain's SIP conference bridge, becomes the +Conference server of the domain's accounts (overwriting what the user set), as +mobile dials and recognises rooms on it. SylkServerConfigurationDidChange is posted with them hunk ./blink/sylk_discovery.py 201 + self._apply(account, self.configuration(account.id.domain)) hunk ./blink/sylk_discovery.py 204 + def _apply_to_domain(self, domain, configuration): + for account in AccountManager().get_accounts(): + if account is not BonjourAccount() and account.id.domain == domain: + self._apply(account, configuration) + + @staticmethod + def _apply(account, configuration): + """What of the domain's settings goes into the account: conference.sipBridge as its + Conference server, overwriting the user's (the server knows its bridge).""" + if not configuration: + return + conference = configuration.get('conference') + bridge = conference.get('sipBridge') if isinstance(conference, dict) else None + if not isinstance(bridge, str) or not bridge.strip(): + return + bridge = bridge.strip().lower() + current = str(account.server.conference_server or '').lower() + if current == bridge: + return + try: + account.server.conference_server = bridge + account.save() + except Exception as e: + ActivityLog().warning(f'[sylkserver] Cannot set the conference server of {account.id} to {bridge}: {e}') + return + ActivityLog().info(f"[sylkserver] Conference server of {account.id} set to {bridge} (conference.sipBridge of {account.id.domain}, was {current or 'not set'})") + hunk ./blink/sylk_discovery.py 318 + call_in_gui_thread(self._apply_to_domain, domain, configuration)