diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php index a4e7954a624..58976f6a614 100644 --- a/lib/Settings/Admin/AdminSettings.php +++ b/lib/Settings/Admin/AdminSettings.php @@ -463,8 +463,8 @@ protected function initSIPBridge(): void { $this->initialState->provideInitialState('sip_bridge_dialin_info', $this->talkConfig->getDialInInfo()); $this->initialState->provideInitialState('sip_bridge_dialout', $this->talkConfig->isSIPDialOutEnabled()); $this->initialState->provideInitialState('sip_bridge_dialout_anonymous', $this->appConfig->getAppValueBool('sip_bridge_dialout_anonymous')); - $this->initialState->provideInitialState('sip_bridge_dialout_number', $this->serverConfig->getAppValue('spreed', 'sip_bridge_dialout_anonymous', '')); - $this->initialState->provideInitialState('sip_bridge_dialout_prefix', $this->serverConfig->getAppValue('spreed', 'sip_bridge_dialout_anonymous', '+')); + $this->initialState->provideInitialState('sip_bridge_dialout_number', $this->serverConfig->getAppValue('spreed', 'sip_bridge_dialout_number', '')); + $this->initialState->provideInitialState('sip_bridge_dialout_prefix', $this->serverConfig->getAppValue('spreed', 'sip_bridge_dialout_prefix', '+')); } protected function getGroupDetailsArray(array $gids, string $configKey): array { diff --git a/src/components/AdminSettings/SIPBridge.vue b/src/components/AdminSettings/SIPBridge.vue index 5f214633af9..208f39fa85d 100644 --- a/src/components/AdminSettings/SIPBridge.vue +++ b/src/components/AdminSettings/SIPBridge.vue @@ -21,6 +21,49 @@ type="warning" :text="t('spreed', 'Signaling server needs to be updated to supported SIP Dial-out feature.')" /> + + + + {}, @@ -134,6 +182,9 @@ export default { return this.currentSetup.sharedSecret !== this.sharedSecret || this.currentSetup.dialInInfo !== this.dialInInfo || this.currentSetup.dialOutEnabled !== this.dialOutEnabled + || this.currentSetup.dialOutAnonymous !== this.dialOutAnonymous + || this.currentSetup.dialOutNumber !== this.dialOutNumber + || this.currentSetup.dialOutPrefix !== this.dialOutPrefix || this.currentSetup.sipGroups !== this.sipGroups.map((group) => group.id).join('_') }, }, @@ -147,6 +198,9 @@ export default { this.sipGroups = this.groups this.dialInInfo = loadState('spreed', 'sip_bridge_dialin_info') this.dialOutEnabled = loadState('spreed', 'sip_bridge_dialout') + this.dialOutAnonymous = loadState('spreed', 'sip_bridge_dialout_anonymous') + this.dialOutNumber = loadState('spreed', 'sip_bridge_dialout_number') + this.dialOutPrefix = loadState('spreed', 'sip_bridge_dialout_prefix') this.sharedSecret = loadState('spreed', 'sip_bridge_shared_secret') this.debounceSearchGroup('') this.loading = false @@ -183,6 +237,9 @@ export default { sharedSecret: this.sharedSecret, dialInInfo: this.dialInInfo, dialOutEnabled: this.dialOutEnabled, + dialOutAnonymous: this.dialOutAnonymous, + dialOutNumber: this.dialOutNumber, + dialOutPrefix: this.dialOutPrefix, sipGroups: this.sipGroups.map((group) => group.id).join('_'), } EventBus.emit('sip-settings-updated', this.currentSetup) @@ -204,6 +261,15 @@ export default { if (this.currentSetup.dialOutEnabled !== this.dialOutEnabled) { await OCP.AppConfig.setValue('spreed', 'sip_dialout', this.dialOutEnabled ? 'yes' : 'no') } + if (this.currentSetup.dialOutAnonymous !== this.dialOutAnonymous) { + await OCP.AppConfig.setValue('spreed', 'sip_bridge_dialout_anonymous', this.dialOutAnonymous) + } + if (this.currentSetup.dialOutNumber !== this.dialOutNumber) { + await OCP.AppConfig.setValue('spreed', 'sip_bridge_dialout_number', this.dialOutNumber) + } + if (this.currentSetup.dialOutPrefix !== this.dialOutPrefix) { + await OCP.AppConfig.setValue('spreed', 'sip_bridge_dialout_prefix', this.dialOutPrefix) + } this.loading = false this.saveCurrentSetup()