Project

General

Profile

Asterisk » History » Version 1

laforge, 01/02/2022 04:59 PM

1 1 laforge
h1. Asterisk DECT channel driver =
2
3
{{>toc}}
4
5
The Asterisk DECT channel driver implements the IWU of a DECT FP. See [[Build_instructions]] for build instructions.
6
7
h2. Build instructions
8
9
See [[Build_instructions#asterisk]] page.
10
11
h2. Channel driver configuration
12
13
The DECT channel driver's configuration is read from ''/etc/asterisk/dect.conf''. An example configuration file is
14
included in the asterisk source and can be installed by running
15
16
<pre>
17
make samples
18
</pre>
19
20
h3. Global DECT options
21
22
The global configuration options are contained in the section called ''[general]''. These options are
23
24
 * _cluster = NAME_ -- cluster name to bind to
25
 * _context = NAME_ -- dialplan context for incoming calls
26
 * _language = COUNTRY-CODE_ -- default language for newly registered PPs
27
 * _regcontext = NAME_ -- dialplan context in which to create an extension for newly registered PPs
28
 * _regexten_base = NUMBER_ -- base number to use for allocating new extensions
29
 * _pin = NUMBER_ -- PIN code (up to 8 digits) to use for registering PPs
30
31
The context option specifies the dialplan context in which incoming calls will be placed. When registering a PP, an extension is automatically allocated for the PP.
32
The extension used will be the first unused number starting at the number specified as regexten_base. This extension is registered in the dialplan context specified as
33
regcontext and can be used to route outgoing calls to the PP. Additionally a name of the format ''DECT-PT-<extension>'' is allocated for each PP.
34
35
h3. Jitter buffer options
36
37
An asterisk jitter buffer can be configured using the following options:
38
39
 * _jbenable = yes/no_ -- enable jitter buffer, defaults to no
40
 * _jbmaxsize = NUMBER_ -- maximum buffer size in milliseconds
41
 * _jbimpl = fixed/adaptive_ -- use fixed or adaptive jitter buffer implementation
42
 * _jblog = yes/no_ -- enable or disable jitter buffer frame logging, defaults to no
43
44
When enabled, the jitter buffer will be used when the sending channel can create jitter.
45
Refer to the asterisk documentation for more details about the jitter buffer.
46
47
h2. PP subscription data storage
48
49
PP subscription data is stored in the asterisk database under @/dect/<IPEI>/@.
50
51
<pre>
52
*CLI> database show
53
54
/dect/0298406861222/capabilities/display_capabilities: 5
55
/dect/0298406861222/capabilities/display_charsets : 0
56
/dect/0298406861222/capabilities/display_columns  : 10
57
/dect/0298406861222/capabilities/display_control  : 2
58
/dect/0298406861222/capabilities/display_lines    : 3
59
/dect/0298406861222/capabilities/display_memory   : 30
60
/dect/0298406861222/capabilities/echo_parameters  : 1
61
/dect/0298406861222/capabilities/noise_rejection  : 1
62
/dect/0298406861222/capabilities/profile_indicator: 200000000000000
63
/dect/0298406861222/capabilities/scrolling        : 0
64
/dect/0298406861222/capabilities/slot_capabilities: 8
65
/dect/0298406861222/capabilities/tone_capabilities: 2
66
/dect/0298406861222/capabilities/volume_ctrl      : 1
67
/dect/0298406861222/codec_list/0/codec            : 3
68
/dect/0298406861222/codec_list/0/cplane           : 0
69
/dect/0298406861222/codec_list/0/service          : 0
70
/dect/0298406861222/codec_list/0/slot             : 1
71
/dect/0298406861222/codec_list/1/codec            : 2
72
/dect/0298406861222/codec_list/1/cplane           : 0
73
/dect/0298406861222/codec_list/1/service          : 0
74
/dect/0298406861222/codec_list/1/slot             : 4
75
/dect/0298406861222/cid_name                      : Patrick McHardy
76
/dect/0298406861222/cid_num                       : 600
77
/dect/0298406861222/context                       : default
78
/dect/0298406861222/language                      : de
79
/dect/0298406861222/name                          : sinus501
80
/dect/0298406861222/regexten                      : 600
81
/dect/0298406861222/ring_pattern                  : 0
82
/dect/0298406861222/uak                           : upS/TqQLli5D8MZAcqpA7w==
83
</pre>
84
85
The subtrees _capabilities_ and _codec_list_ are automatically updated based on data submitted during the access rights request and location updates and should
86
not be changed manually. The other values might be changed using the @database put@ command. To activate changes made to the database, use the Wdect reload database@ command.
87
88
h2. CLI commands
89
90
The DECT channel driver supports the following CLI commands:
91
92
 * @dect set debug on/off@ -- enable/disable libdect debugging
93
 * @dect access-rights enable/disable@ -- enable/disable access rights requests
94
 * @dect access-rights terminate NAME@ -- terminate access rights for the given PP
95
 * @dect show portables@ -- show a list of all registered PPs
96
 * @dect show portable NAME@ -- show information about a specific PP
97
 * @dect reload database@ -- reload PT information from database
98
99
To pair a PP, access rights requests must be enabled. They are disabled again automatically after 120 seconds or when an access rights request has been successfully completed. During
100
the access rights request, key allocation for the PP is performed, which transforms the PIN into an 128 bit authentication key.
101
102
h2. Dialplan
103
104
h3. Incoming calls (from PP)
105
106
There are two options how to construct the dialplan. The line can be either answered manually using the @Answer()@ command, in which case an asterisk
107
generated dialtone will be played to the phone while waiting for a valid extension, or the dect channel driver can instruct the phone to generate a
108
dialtone itself without answering a line and wait until a valid extension is dialed. For manually picking up the line, use the commands below in your
109
dialplan. For channel controlled pickup, just use a regular dialplan without the @Answer()@ command.
110
111
Manually answered:
112
113
<pre>
114
exten => s,1,Answer                    ; Answer the line
115
exten => s,n,Set(TIMEOUT(digit)=5)     ; Set Digit Timeout to 5 seconds
116
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
117
exten => s,n,WaitExten(,d)             ; Wait for an extension to be dialed.
118
</pre>
119
120
h3. Outgoing calls (to PP)
121
122
Calls to a PP are directed to the DECT channel driver similar as with other channel drivers. Ring patterns can be configured in the dialplan by setting
123
the environment variable @RING_PATTERN@ to a value from 0-7 or _silent_.
124
125
Example using the automatically allocated extensions @600@ and @601@ in the regcontext #dect_register@ for routing outgoing calls:
126
127
<pre>
128
include => dect_register                ; regcontext
129
</pre>
130
131
Example manually setting different ring patterns and invoking the asterisk @stdexten@ macro for routing outgoing calls.
132
133
<pre>
134
include => stdexten
135
136
exten => 600,1,Set(RING_PATTERN=3)
137
exten => 600,n,Gosub(stdexten(600,DECT/DECT-PT-600))
138
exten => 600,1,Set(RING_PATTERN=silent)
139
exten => 601,n,Gosub(stdexten(601,DECT/DECT-PT-601))
140
</pre>
141
142
h3. !DectUserAuth application
143
144
All connections from a PP are authenticated using the allocated user authentication key.
145
To additionally authenticate the user using the PP, the @DectUserAuth@ application can be used. It takes an UPI (User Personal Identity, up to 8 digit PIN code) as
146
argument and requests the PP to authenticate the user. The application returns the authentication result (@SUCCESS@/@FAILURE@) in the @USERAUTHSTATUS@ variable.
147
148
<pre>
149
exten => 1000,1,DectUserAuth(1234)
150
exten => 1000,n,Goto(1000-${USERAUTHSTATUS},1)
151
152
exten => 1000-SUCCESS,1,SendText(Authentication successful)
153
exten => 1000-SUCCESS,n,Wait(3)
154
exten => 1000-SUCCESS,n,Hangup()
155
156
exten => 1000-FAILURE,1,SendText(Authentication failed)
157
exten => 1000-FAILURE,n,Wait(3)
158
exten => 1000-FAILURE,n,Hangup()
159
</pre>
160
161
h3. Misc
162
163
The @SendText()@ application can be used to display text on the PP's display during an active call.
164
165
<pre>
166
[from-dect]
167
168
exten => s,1,Answer()
169
exten => s,n,Set(TIMEOUT(digit)=5)
170
exten => s,n,Set(TIMEOUT(response)=10)
171
exten => s,n,WaitExten(,d)
172
173
exten => _X.,1,SendText(Connecting call to SIP/${EXTEN})
174
exten => _X.,n,Dial(SIP/${EXTEN}@dect,,rT)
175
exten => _X.,n,Goto(dect-${DIALSTATUS},1)
176
177
exten => dect-NOANSWER,1,SendText(No answer)
178
exten => dect-NOANSWER,n,Wait(3)
179
exten => dect-NOANSWER,n,Hangup()
180
181
exten => dect-BUSY,1,SendText(Line busy)
182
exten => dect-BUSY,n,Wait(3)
183
exten => dect-BUSY,n,Hangup()
184
185
exten => t,1,SendText(Timeout waiting for extension)
186
exten => t,n,Wait(3)
187
exten => t,n,Hangup()
188
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)