TT#136550 CallForwarding - Add missing call forwarding types

- Add call forwarding type "Auto Attendant"
- Add call forwarding type "Office Hours Announcement"
- Add call forwarding type "Calling Card"
- Add call forwarding type "Call Through"
- Add call forwarding type "Local Subscriber"
- Add "gridView" to call forwarding menu

Change-Id: Ib64668e3caadfed2ec631d0242e0eef07aa7d819
mr10.1.1
Hans-Peter Herzog 4 years ago
parent d0a51c3ff9
commit 07a4dbd95f

@ -6,8 +6,24 @@
dense
@click.stop.prevent
>
<csc-popup-menu>
<csc-popup-menu
:grid-view="gridView"
>
<slot />
<template
v-slot:grid-column-1
>
<slot
name="grid-column-1"
/>
</template>
<template
v-slot:grid-column-2
>
<slot
name="grid-column-2"
/>
</template>
</csc-popup-menu>
</q-btn>
</template>
@ -17,6 +33,12 @@ export default {
name: 'CscMoreMenu',
components: {
CscPopupMenu
},
props: {
gridView: {
type: Boolean,
default: false
}
}
}
</script>

@ -3,16 +3,52 @@
@before-show="$store.commit('callForwarding/popupShow', null)"
>
<q-list
v-if="!gridView"
v-bind="$attrs"
v-on="$listeners"
>
<slot />
</q-list>
<div
v-else
class="row"
>
<div
class="col-xs-12 col-lg-6"
>
<q-list
v-bind="$attrs"
v-on="$listeners"
>
<slot
name="grid-column-1"
/>
</q-list>
</div>
<div
class="col-xs-12 col-lg-6"
>
<q-list
v-bind="$attrs"
v-on="$listeners"
>
<slot
name="grid-column-2"
/>
</q-list>
</div>
</div>
</q-popup-proxy>
</template>
<script>
export default {
name: 'CscPopupMenu'
name: 'CscPopupMenu',
props: {
gridView: {
type: Boolean,
default: false
}
}
}
</script>

@ -0,0 +1,69 @@
<template>
<span
:class="cssClasses"
>
<q-icon
:name="destinationIcon"
/>
{{ destinationLabel }}
<slot />
</span>
</template>
<script>
import destination from 'src/mixins/destination'
export default {
name: 'CscCfDestination',
mixins: [destination],
props: {
value: {
type: Object,
default: undefined
},
icon: {
type: String,
default: undefined
},
label: {
type: String,
default: undefined
},
clickable: {
type: Boolean,
default: false
}
},
computed: {
destinationIcon () {
if (this.icon) {
return this.icon
} else if (this.value?.destination) {
return this.destinationIconBySipUri(this.value.destination)
} else {
return ''
}
},
destinationLabel () {
if (this.label) {
return this.label
} else if (this.value?.destination) {
return this.destinationFormattedBySipUri(this.value.destination)
} else {
return ''
}
},
cssClasses () {
return [
'q-pl-xs',
'text-weight-bold',
'text-no-wrap',
...(this.clickable ? [
'cursor-pointer',
'text-primary'
] : [])
]
}
}
}
</script>

@ -0,0 +1,61 @@
<template>
<csc-cf-destination
:value="destination"
:label="announcement ? announcement.label : ''"
:clickable="true"
>
<q-popup-edit
v-model="announcement"
buttons
anchor="top left"
@before-show="$store.commit('callForwarding/popupShow', null)"
@save="$emit('input', announcement)"
>
<q-select
v-model="announcement"
map-options
:rules="[ checkAnnouncement ]"
:options="announcements"
:label="$t('Custom Announcements')"
:disable="$attrs.loading"
/>
</q-popup-edit>
</csc-cf-destination>
</template>
<script>
import CscCfDestination from 'components/call-forwarding/CscCfDestination'
import { showGlobalError } from 'src/helpers/ui'
export default {
name: 'CscCfDestinationCustomAnnouncement',
components: { CscCfDestination },
props: {
destination: {
type: Object,
default: undefined
},
announcements: {
type: Array,
default: undefined
}
},
data () {
return {
announcement: this.$attrs.value
}
},
watch: {
'$attrs.value' (value) {
this.announcement = value
}
},
methods: {
checkAnnouncement () {
const fieldFilled = this.announcement
if (!fieldFilled) {
showGlobalError(this.$t('Please select an option'))
}
return fieldFilled
}
}
}
</script>

@ -0,0 +1,52 @@
<template>
<csc-cf-destination
:value="destination"
:label="destination.simple_destination === ' ' ? $t('Number') : destination.simple_destination"
:clickable="true"
>
<q-popup-edit
v-model="number"
buttons
@before-show="$store.commit('callForwarding/popupShow', null)"
@save="$emit('input', $event)"
>
<csc-input
v-model="number"
dense
>
<template
v-slot:prepend
>
<q-icon
name="phone_forwarded"
/>
</template>
</csc-input>
</q-popup-edit>
</csc-cf-destination>
</template>
<script>
import CscCfDestination from 'components/call-forwarding/CscCfDestination'
import CscInput from 'components/form/CscInput'
export default {
name: 'CscCfDestinationNumber',
components: { CscInput, CscCfDestination },
props: {
destination: {
type: Object,
default: undefined
}
},
data () {
return {
number: this.$attrs.value
}
},
watch: {
'$attrs.value' (value) {
this.number = value
}
}
}
</script>

@ -92,118 +92,29 @@
</span>
{{ $t('forwarded to') }}
</template>
<span
v-if="destination.destination.endsWith('voicebox.local')"
class="q-pl-xs text-weight-bold"
style="white-space: nowrap"
>
<q-icon
name="voicemail"
/>
{{ $t('Voicebox') }}
</span>
<span
v-else-if="destination.destination.endsWith('fax2mail.local')"
class="q-pl-xs text-weight-bold"
style="white-space: nowrap"
>
<q-icon
name="email"
/>
{{ $t('Fax2Mail') }}
</span>
<span
v-else-if="destination.destination.endsWith('managersecretary.local')"
class="q-pl-xs text-weight-bold"
style="white-space: nowrap"
>
<q-icon
name="phone_forwarded"
/>
{{ $t('ManagerSecretary') }}
</span>
<span
v-else-if="destination.destination.endsWith('conference.local')"
class="q-pl-xs text-weight-bold"
style="white-space: nowrap"
>
<q-icon
name="groups"
/>
{{ $t('Conference') }}
</span>
<span
v-else-if="destination.announcement_id"
class="q-pl-xs text-primary text-weight-bold cursor-pointer"
style="white-space: nowrap"
>
<q-icon
name="music_note"
/>
{{ announcement ? announcement.label : '' }}
<q-popup-edit
v-model="announcement"
buttons
anchor="top left"
@before-show="$store.commit('callForwarding/popupShow', null)"
@save="updateAnnouncementEvent({
destinationIndex: destinationIndex,
destinationSetId: destinationSet.id
})"
>
<q-select
v-model="announcement"
emit-value
map-options
:rules="[ checkAnnouncement ]"
:options="announcements"
:label="$t('Custom Announcements')"
:disable="loading"
/>
</q-popup-edit>
</span>
<span
v-else-if="destination.destination.endsWith('app.local')"
class="q-pl-xs text-weight-bold"
style="white-space: nowrap"
>
<q-icon
name="app"
/>
{{ $t('Application') }}
</span>
<span
<csc-cf-destination-custom-announcement
v-if="isDestinationTypeCustomAnnouncement(destination.destination) && destination.announcement_id"
v-model="announcement"
:destination="destination"
:announcements="announcements"
@input="updateAnnouncementEvent({
destinationIndex: destinationIndex,
destinationSetId: destinationSet.id
})"
/>
<csc-cf-destination-number
v-else-if="isDestinationTypeNumber(destination.destination)"
v-model="changedDestination"
:destination="destination"
@input="updateDestinationEvent({
destinationIndex: destinationIndex,
destinationSetId: destinationSet.id
})"
/>
<csc-cf-destination
v-else
class="q-pl-xs text-primary text-weight-bold cursor-pointer"
style="white-space: nowrap"
>
<q-icon
name="phone_forwarded"
/>
{{ destination.simple_destination }}
<q-popup-edit
v-model="changedDestination"
buttons
@before-show="$store.commit('callForwarding/popupShow', null)"
@save="updateDestinationEvent({
destinationIndex: destinationIndex,
destinationSetId: destinationSet.id
})"
>
<csc-input
v-model="changedDestination"
dense
>
<template
v-slot:prepend
>
<q-icon
name="phone_forwarded"
/>
</template>
</csc-input>
</q-popup-edit>
</span>
:value="destination"
/>
</q-item-label>
</q-item-section>
<q-item-section
@ -241,9 +152,14 @@ import CscSpinner from 'components/CscSpinner'
import {
showGlobalError
} from 'src/helpers/ui'
import destination from 'src/mixins/destination'
import CscCfDestination from 'components/call-forwarding/CscCfDestination'
import CscCfDestinationCustomAnnouncement from 'components/call-forwarding/CscCfDestinationCustomAnnouncement'
import CscCfDestinationNumber from 'components/call-forwarding/CscCfDestinationNumber'
export default {
name: 'CscCfGroupItem',
components: { CscSpinner, CscInput, CscPopupMenuItemDelete, CscMoreMenu },
components: { CscCfDestinationNumber, CscCfDestinationCustomAnnouncement, CscCfDestination, CscSpinner, CscInput, CscPopupMenuItemDelete, CscMoreMenu },
mixins: [destination],
props: {
mapping: {
type: Object,
@ -366,7 +282,7 @@ export default {
async updateAnnouncementEvent (payload) {
this.$wait.start(this.waitIdentifier)
try {
await this.updateAnnouncement({ ...payload, announcementId: this.announcement })
await this.updateAnnouncement({ ...payload, announcementId: this.announcement.value })
this.setAnnouncement()
} catch (err) {
showGlobalError(err.message)

@ -184,80 +184,137 @@
<q-item-section
side
>
<csc-more-menu>
<csc-popup-menu-item
v-if="mapping.type === 'cfu' && hasSubscriberProfileAttribute('cft')"
icon="ring_volume"
:label="$t('Ring primary number')"
@click="ringPrimaryNumberEvent"
/>
<csc-popup-menu-item
v-if="mapping.type === 'cft'"
icon="phone_disabled"
:label="$t('Do not ring primary number')"
@click="doNotRingPrimaryNumberEvent"
/>
<csc-popup-menu-item
icon="phone_forwarded"
:label="$t('Forward to Number')"
:disable="hasTermination"
@click="addDestinationEvent({
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
icon="voicemail"
:label="$t('Forward to Voicebox')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'voicebox',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
icon="email"
:label="$t('Forward to Fax2Mail')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'fax2mail',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
icon="phone_forwarded"
:label="$t('Forward to ManagerSecretary')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'managersecretary',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
icon="groups"
:label="$t('Forward to Conference')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'conference',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
icon="music_note"
:label="$t('Custom Announcement')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'customhours',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="(mapping.enabled)?'toggle_on':'toggle_off'"
:label="(mapping.enabled)?$t('Disable'):$t('Enable')"
@click="toggleMappingEvent(mapping)"
/>
<csc-popup-menu-item-delete
@click="deleteMappingEvent(mapping)"
/>
<csc-more-menu
:grid-view="true"
>
<template
v-slot:grid-column-1
>
<csc-popup-menu-item
v-if="mapping.type === 'cfu' && hasSubscriberProfileAttribute('cft')"
icon="ring_volume"
:label="$t('Ring primary number')"
@click="ringPrimaryNumberEvent"
/>
<csc-popup-menu-item
v-if="mapping.type === 'cft'"
icon="phone_disabled"
:label="$t('Do not ring primary number')"
@click="doNotRingPrimaryNumberEvent"
/>
<csc-popup-menu-item
:icon="destinationIconByType('Number')"
:label="$t('Forward to Number')"
:disable="hasTermination"
@click="addDestinationEvent({
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('VoiceBox')"
:label="$t('Forward to Voicebox')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'voicebox',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('Conference')"
:label="$t('Forward to Conference')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'conference',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('Fax2Mail')"
:label="$t('Forward to Fax2Mail')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'fax2mail',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('ManagerSecretary')"
:label="$t('Forward to Manager Secretary')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'managersecretary',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('CustomAnnouncement')"
:label="$t('Forward to Custom Announcement')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'customhours',
destinationSetId: destinationSet.id
})"
/>
</template>
<template
v-slot:grid-column-2
>
<csc-popup-menu-item
v-if="isPbxAttendant"
:icon="destinationIconByType('AutoAttendant')"
:label="$t('Forward to Auto Attendant')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'autoattendant',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
v-if="isPbxAttendant"
:icon="destinationIconByType('OfficeHoursAnnouncement')"
:label="$t('Forward to Office Hours Announcement')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'officehours',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('CallingCard')"
:label="$t('Forward to Calling Card')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'callingcard',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('CallThrough')"
:label="$t('Forward to Call Through')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'callthrough',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="destinationIconByType('LocalSubscriber')"
:label="$t('Forward to Local Subscriber')"
:disable="hasTermination"
@click="addDestinationEvent({
destination: 'localuser',
destinationSetId: destinationSet.id
})"
/>
<csc-popup-menu-item
:icon="(mapping.enabled)?'toggle_on':'toggle_off'"
:label="(mapping.enabled)?$t('Disable'):$t('Enable')"
@click="toggleMappingEvent(mapping)"
/>
<csc-popup-menu-item-delete
@click="deleteMappingEvent(mapping)"
/>
</template>
</csc-more-menu>
</q-item-section>
</q-item>
@ -278,6 +335,7 @@ import CscCfConditionPopupCallNotFrom from 'components/call-forwarding/CscCfCond
import CscCfConditionPopupDateRange from 'components/call-forwarding/CscCfConditionPopupDateRange'
import CscCfConditionPopupWeekdays from 'components/call-forwarding/CscCfConditionPopupWeekdays'
import CscCfConditionPopupOfficeHours from 'components/call-forwarding/CscCfConditionPopupOfficeHours'
import destination from 'src/mixins/destination'
export default {
name: 'CscCfGroupTitle',
components: {
@ -292,6 +350,7 @@ export default {
CscPopupMenuItemDelete,
CscMoreMenu
},
mixins: [destination],
props: {
mapping: {
type: Object,
@ -316,7 +375,8 @@ export default {
},
computed: {
...mapGetters('user', [
'hasSubscriberProfileAttribute'
'hasSubscriberProfileAttribute',
'isPbxAttendant'
]),
clickableClasses () {
return ['cursor-pointer', 'text-weight-bold', 'text-primary']

@ -45,6 +45,7 @@
"Apps": "Apps",
"Assigned slot {slot}": "Assigned slot {slot}",
"Attach voicemail to email notification": "Attach voicemail to email notification",
"Auto Attendant": "Auto Attendant",
"Auto-attendant": "Auto-attendant",
"Block Incoming": "Block Incoming",
"Block Incoming/Outgoing": "Block Incoming/Outgoing",
@ -60,6 +61,7 @@
"Call Queue": "Call Queue",
"Call Queues": "Call Queues",
"Call Settings": "Call Settings",
"Call Through": "Call Through",
"Call back": "Call back",
"Call ended": "Call ended",
"Call forwarded": "Call forwarded",
@ -68,6 +70,7 @@
"Callee": "Callee",
"Caller": "Caller",
"Calling": "Calling",
"Calling Card": "Calling Card",
"Calling {number}...": "Calling {number}...",
"Calls": "Calls",
"Calls, Faxes, VoiceMails": "Calls, Faxes, VoiceMails",
@ -167,10 +170,17 @@
"Fine": "Fine",
"Forgot password?": "Forgot password?",
"Format": "Format",
"Forward to Auto Attendant": "Forward to Auto Attendant",
"Forward to Call Through": "Forward to Call Through",
"Forward to Calling Card": "Forward to Calling Card",
"Forward to Conference": "Forward to Conference",
"Forward to Custom Announcement": "Forward to Custom Announcement",
"Forward to Fax2Mail": "Forward to Fax2Mail",
"Forward to Local Subscriber": "Forward to Local Subscriber",
"Forward to Manager Secretary": "Forward to Manager Secretary",
"Forward to ManagerSecretary": "Forward to ManagerSecretary",
"Forward to Number": "Forward to Number",
"Forward to Office Hours Announcement": "Forward to Office Hours Announcement",
"Forward to Voicebox": "Forward to Voicebox",
"Forwarded to": "Forwarded to",
"Forwarding": "Forwarding",
@ -218,6 +228,7 @@
"Leave conference": "Leave conference",
"Leave current conference now!": "Leave current conference now!",
"List of registered devices for the subscriber": "List of registered devices for the subscriber",
"Local Subscriber": "Local Subscriber",
"Login": "Login",
"Logout": "Logout",
"Loop": "Loop",
@ -275,6 +286,7 @@
"Number list": "Number list",
"Number list name": "Number list name",
"Numbers": "Numbers",
"Office Hours Announcement": "Office Hours Announcement",
"On weekdays": "On weekdays",
"Only incoming calls from listed numbers are allowed": "Only incoming calls from listed numbers are allowed",
"Only once": "Only once",

@ -0,0 +1,160 @@
import sipUriParse from 'src/sip-uri-parse'
import _ from 'lodash'
const DestinationType = {
VoiceBox: 'VoiceBox',
Conference: 'Conference',
Fax2Mail: 'Fax2Mail',
CallingCard: 'CallingCard',
CallThrough: 'CallThrough',
AutoAttendant: 'AutoAttendant',
OfficeHoursAnnouncement: 'OfficeHoursAnnouncement',
CustomAnnouncement: 'CustomAnnouncement',
LocalSubscriber: 'LocalSubscriber',
ManagerSecretary: 'ManagerSecretary',
Application: 'Application',
Number: 'Number'
}
function parseSipUri (sipUri) {
const parsedUri = sipUriParse(sipUri)
const host = parsedUri.host
const username = parsedUri.username
let destinationType
if (host.endsWith('voicebox.local')) {
destinationType = DestinationType.VoiceBox
} else if (host.endsWith('conference.local')) {
destinationType = DestinationType.Conference
} else if (host.endsWith('fax2mail.local')) {
destinationType = DestinationType.Fax2Mail
} else if (username === 'callingcard' && host.endsWith('app.local')) {
destinationType = DestinationType.CallingCard
} else if (username === 'callthrough' && host.endsWith('app.local')) {
destinationType = DestinationType.CallThrough
} else if (username === 'auto-attendant' && host.endsWith('app.local')) {
destinationType = DestinationType.AutoAttendant
} else if (username === 'office-hours' && host.endsWith('app.local')) {
destinationType = DestinationType.OfficeHoursAnnouncement
} else if (username === 'custom-hours' && host.endsWith('app.local')) {
destinationType = DestinationType.CustomAnnouncement
} else if (username === 'localuser' && host.endsWith('local')) {
destinationType = DestinationType.LocalSubscriber
} else if (host.endsWith('managersecretary.local')) {
destinationType = DestinationType.ManagerSecretary
} else if (host.endsWith('app.local')) {
destinationType = DestinationType.Application
} else {
destinationType = DestinationType.Number
}
return {
destinationType,
parsedUri
}
}
export default {
methods: {
isDestinationType (sipUri, destinationType) {
const parsedSipUri = parseSipUri(sipUri)
return parsedSipUri.destinationType === destinationType
},
isDestinationTypeVoiceBox (sipUri) {
return this.isDestinationType(sipUri, DestinationType.VoiceBox)
},
isDestinationTypeConference (sipUri) {
return this.isDestinationType(sipUri, DestinationType.Conference)
},
isDestinationTypeFax2Mail (sipUri) {
return this.isDestinationType(sipUri, DestinationType.Fax2Mail)
},
isDestinationTypeCallingCard (sipUri) {
return this.isDestinationType(sipUri, DestinationType.CallingCard)
},
isDestinationTypeCallThrough (sipUri) {
return this.isDestinationType(sipUri, DestinationType.CallThrough)
},
isDestinationTypeAutoAttendant (sipUri) {
return this.isDestinationType(sipUri, DestinationType.AutoAttendant)
},
isDestinationTypeOfficeHoursAnnouncement (sipUri) {
return this.isDestinationType(sipUri, DestinationType.OfficeHoursAnnouncement)
},
isDestinationTypeCustomAnnouncement (sipUri) {
return this.isDestinationType(sipUri, DestinationType.CustomAnnouncement)
},
isDestinationTypeLocalSubscriber (sipUri) {
return this.isDestinationType(sipUri, DestinationType.LocalSubscriber)
},
isDestinationTypeManagerSecretary (sipUri) {
return this.isDestinationType(sipUri, DestinationType.ManagerSecretary)
},
isDestinationTypeApplication (sipUri) {
return this.isDestinationType(sipUri, DestinationType.Application)
},
isDestinationTypeNumber (sipUri) {
return this.isDestinationType(sipUri, DestinationType.Number)
},
destinationIconBySipUri (sipUri) {
const parsedSipUri = parseSipUri(sipUri)
return this.destinationIconByType(parsedSipUri.destinationType)
},
destinationIconByType (destinationType) {
switch (destinationType) {
case DestinationType.VoiceBox:
return 'voicemail'
case DestinationType.Conference:
return 'groups'
case DestinationType.Fax2Mail:
return 'email'
case DestinationType.CallingCard:
return 'credit_card'
case DestinationType.CallThrough:
return 'double_arrow'
case DestinationType.AutoAttendant:
return 'dialpad'
case DestinationType.OfficeHoursAnnouncement:
return 'schedule'
case DestinationType.CustomAnnouncement:
return 'music_note'
case DestinationType.LocalSubscriber:
return 'person_pin'
case DestinationType.ManagerSecretary:
return 'support_agent'
case DestinationType.Application:
return 'apps'
case DestinationType.Number:
return 'phone_forwarded'
}
},
destinationFormattedBySipUri (sipUri) {
const parsedSipUri = parseSipUri(sipUri)
switch (parsedSipUri.destinationType) {
case DestinationType.VoiceBox:
return this.$t('Voicebox')
case DestinationType.Conference:
return this.$t('Conference')
case DestinationType.Fax2Mail:
return this.$t('Fax2Mail')
case DestinationType.CallingCard:
return this.$t('Calling Card')
case DestinationType.CallThrough:
return this.$t('Call Through')
case DestinationType.AutoAttendant:
return this.$t('Auto Attendant')
case DestinationType.OfficeHoursAnnouncement:
return this.$t('Office Hours Announcement')
case DestinationType.CustomAnnouncement:
return this.$t('Custom Announcement')
case DestinationType.LocalSubscriber:
return this.$t('Local Subscriber')
case DestinationType.ManagerSecretary:
return this.$t('Manager Secretary')
case DestinationType.Application:
return _.words(parsedSipUri.parsedUri.username).map(word => _.upperFirst(word)).join(' ')
default:
case DestinationType.Number:
return parsedSipUri.parsedUri.username
}
}
}
}

@ -33,7 +33,7 @@ const DEFAULT_CUSTOM_ANNOUNCEMENT_ID = 255 // TODO get from endpoint
function createDefaultDestination (destination) {
const payload = {
destination: destination || 'Number',
destination: destination || ' ',
priority: DEFAULT_PRIORITY,
timeout: DEFAULT_RING_TIMEOUT
}

@ -189,6 +189,18 @@ export default {
},
isOldCSCProxyingAllowed (state, getters) {
return getters.isAdmin && state.platformInfo?.csc_v2_mode === 'mixed' && !!getters.getCustomerId
},
isPbxPilot (state) {
return !!state.subscriber?.is_pbx_pilot
},
isPbxGroup (state) {
return !!state.subscriber?.is_pbx_group
},
isPbxSeat (state, getters) {
return !getters.isPbxPilot && !getters.isPbxGroup && !!state.subscriber?.pbx_extension
},
isPbxAttendant (state, getters) {
return getters.isPbxPilot || getters.isPbxGroup || getters.isPbxSeat
}
},
mutations: {

Loading…
Cancel
Save