1form!
2title "Configure Calls"
3
4field(
5 var: "fwd[voicemail_enabled]",
6 type: "boolean",
7 label: "Voicemail enabled",
8 value: @customer.fwd.voicemail_enabled?
9)
10
11if @customer.fwd.voicemail_enabled?
12 field(
13 var: "fwd[timeout]",
14 type: "text-single",
15 datatype: "xs:integer",
16 label: "Seconds to ring before voicemail",
17 description: "One ring is ~5 seconds",
18 value: @customer.fwd.timeout.to_i.to_s,
19 range: (0..300)
20 )
21
22 field(
23 var: "voicemail_transcription",
24 type: "boolean",
25 label: "Voicemail transcription",
26 value: @customer.transcription_enabled.to_s
27 )
28end
29
30field(
31 var: "fwd[uri]",
32 type: "list-single",
33 datatype: "xs:anyURI",
34 open: true,
35 label: "Forward calls to",
36 description: "List item or any custom xmpp:, sip:, or tel: URI.",
37 options: [
38 { label: "Jabber ID", value: "xmpp:#{@customer.jid}" },
39 { label: "SIP Account", value: @customer.sip_account.uri }
40 ],
41 value: @customer.fwd.uri
42)
43
44if (lidb = @customer.tndetails.dig(:features, :lidb))
45 field(
46 var: "lidb_name",
47 type: "fixed",
48 label: "CNAM",
49 value: "#{lidb[:subscriber_information]} (#{lidb[:status]})"
50 )
51elsif @customer.tndetails[:on_net_vendor]
52 field(
53 var: "lidb_name",
54 type: "text-single",
55 label: "CNAM Name",
56 description: "or nothing/space to leave blank"
57 )
58end