Version 6.1 by michaely on 2016/05/31 13:24

Show last authors
1 {{layout}}
2 {{layout-section ac:type="two_right_sidebar"}}
3 {{layout-cell}}
4 {{warning}}
5 This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.
6 {{/warning}}
7
8 {{info}}
9 The information on this page applies to **iSymphony 3.1+**.
10 {{/info}}
11
12 = (% style="color: rgb(0,0,0);" %)Description(%%) =
13
14 The Asterisk extension configuration REST resource allows access to the configuration for extensions in the system. This resource allows adding, removing, and updating of extensions in the system.
15
16
17 {{/layout-cell}}
18
19 {{layout-cell}}
20 {{panel title="On this page:"}}
21
22
23 {{toc maxLevel="2" indent="1"/}}
24 {{/panel}}
25 {{/layout-cell}}
26 {{/layout-section}}
27
28 {{layout-section ac:type="single"}}
29 {{layout-cell}}
30 = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) =
31
32 {{code}}
33 communication_manager/rest/config/asterisk/{coreServerId}/extensions
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "id": "1584e59e-ce3c-4523-aa2d-af65c95fb29b",
41 "extension": "4224",
42 "displayName": "Sean",
43 "autoAnswer": false,
44 "peer": "SIP\/4224",
45 "altOriginationMethod": "",
46 "agentName": "Sean - Lappy",
47 "agentLocation": "Local\/4224@from-queue\/n",
48 "agentInterface": "SIP\/4224",
49 "agentPenalty": 0,
50 "agentPaused": false,
51 "originatingContextOverride": "",
52 "redirectingContextOverride": "",
53 "originateTimeoutOverride": 0,
54 "voiceMailContext": "default",
55 "voiceMailBox": "4224",
56 "permissionDisplayName": "Sean <4224>",
57 "permissionId": "1584e59e-ce3c-4523-aa2d-af65c95fb29b"
58 }
59 {{/code}}
60
61 |=(((
62 Property
63 )))|=(((
64 Type
65 )))|=(((
66 Description
67 )))
68 |(((
69 {{{id}}}
70 )))|(((
71 String
72 )))|(((
73 Configuration id of the extension.
74 )))
75 |(% colspan="1" %)(% colspan="1" %)
76 (((
77 extension
78 )))|(% colspan="1" %)(% colspan="1" %)
79 (((
80 String
81 )))|(% colspan="1" %)(% colspan="1" %)
82 (((
83 The extension number. Used when dialing or transferring to the extensions.
84 )))
85 |(% colspan="1" %)(% colspan="1" %)
86 (((
87 {{{displayName}}}
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 String
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 The display name of the extension.
94 )))
95 |(% colspan="1" %)(% colspan="1" %)
96 (((
97 autoAnswer
98 )))|(% colspan="1" %)(% colspan="1" %)
99 (((
100 Boolean
101 )))|(% colspan="1" %)(% colspan="1" %)
102 (((
103 Flag specifying if auto answer SIP headers will be added for the initial call backs created by originations in the panel.
104 )))
105 |(% colspan="1" %)(% colspan="1" %)
106 (((
107 peer
108 )))|(% colspan="1" %)(% colspan="1" %)
109 (((
110 String
111 )))|(% colspan="1" %)(% colspan="1" %)
112 (((
113 The peer of the extension. Used to track call state on the extension.
114 )))
115 |(% colspan="1" %)(% colspan="1" %)
116 (((
117 {{{altOriginationMethod}}}
118 )))|(% colspan="1" %)(% colspan="1" %)
119 (((
120 String
121 )))|(% colspan="1" %)(% colspan="1" %)
122 (((
123 An alternative origination peer to use when makeing calls from this extension. This is very rarly set to a non blank value.
124 )))
125 |(% colspan="1" %)(% colspan="1" %)
126 (((
127 {{{agentName}}}
128 )))|(% colspan="1" %)(% colspan="1" %)
129 (((
130 String
131 )))|(% colspan="1" %)(% colspan="1" %)
132 (((
133 The display name for the extension when it is logged in as an agent in the queue.
134 )))
135 |(% colspan="1" %)(% colspan="1" %)
136 (((
137 {{{agentLocation}}}
138 )))|(% colspan="1" %)(% colspan="1" %)
139 (((
140 String
141 )))|(% colspan="1" %)(% colspan="1" %)
142 (((
143 The location of the extension used to identify the agent destination when this extension is logged into a queue.
144 )))
145 |(% colspan="1" %)(% colspan="1" %)
146 (((
147 {{{agentInterface}}}
148 )))|(% colspan="1" %)(% colspan="1" %)
149 (((
150 String
151 )))|(% colspan="1" %)(% colspan="1" %)
152 (((
153 The agent device that will be used to track agent state when this extension is logged into a queue.
154 )))
155 |(% colspan="1" %)(% colspan="1" %)
156 (((
157 {{{agentPenalty}}}
158 )))|(% colspan="1" %)(% colspan="1" %)
159 (((
160 Integer
161 )))|(% colspan="1" %)(% colspan="1" %)
162 (((
163 The default penalty that this extension will be given when it is logged into a queue, via the panel.
164 )))
165 |(% colspan="1" %)(% colspan="1" %)
166 (((
167 {{{agentPaused}}}
168 )))|(% colspan="1" %)(% colspan="1" %)
169 (((
170 Boolean
171 )))|(% colspan="1" %)(% colspan="1" %)
172 (((
173 Flag specifying if the agent will be automatically paused when they are logged into a queue, via the panel.
174 )))
175 |(% colspan="1" %)(% colspan="1" %)
176 (((
177 {{{originatingContextOverride}}}
178 )))|(% colspan="1" %)(% colspan="1" %)
179 (((
180 String
181 )))|(% colspan="1" %)(% colspan="1" %)
182 (((
183 An override to the global originating context set on the core server level.
184 )))
185 |(% colspan="1" %)(% colspan="1" %)
186 (((
187 (% style="line-height: 1.42857;" %)redirectingContextOverride
188
189 )))|(% colspan="1" %)(% colspan="1" %)
190 (((
191 String
192 )))|(% colspan="1" %)(% colspan="1" %)
193 (((
194 An override to the global redirecting context set on the core server level.
195 )))
196 |(% colspan="1" %)(% colspan="1" %)
197 (((
198 (% style="line-height: 1.42857;" %)originateTimeoutOverride
199
200 )))|(% colspan="1" %)(% colspan="1" %)
201 (((
202 Integer
203 )))|(% colspan="1" %)(% colspan="1" %)
204 (((
205 An override to the global origination timeout set on the core server level.
206 )))
207 |(% colspan="1" %)(% colspan="1" %)
208 (((
209 {{{voiceMailContext}}}
210 )))|(% colspan="1" %)(% colspan="1" %)
211 (((
212 String
213 )))|(% colspan="1" %)(% colspan="1" %)
214 (((
215 The context of the extension's voicemail box.
216 )))
217 |(% colspan="1" %)(% colspan="1" %)
218 (((
219 {{{voiceMailBox}}}
220 )))|(% colspan="1" %)(% colspan="1" %)
221 (((
222 String
223 )))|(% colspan="1" %)(% colspan="1" %)
224 (((
225 The name of the extension's voicemail box.
226 )))
227 |(% colspan="1" %)(% colspan="1" %)
228 (((
229 {{{permissionDisplayName}}}
230 )))|(% colspan="1" %)(% colspan="1" %)
231 (((
232 String
233 )))|(% colspan="1" %)(% colspan="1" %)
234 (((
235 Display name of the extension in the permission system.
236 )))
237 |(% colspan="1" %)(% colspan="1" %)
238 (((
239 {{{permissionId}}}
240 )))|(% colspan="1" %)(% colspan="1" %)
241 (((
242 String
243 )))|(% colspan="1" %)(% colspan="1" %)
244 (((
245 Permission id of the extension.
246 )))
247
248 = Resource Paths =
249
250 |=(% colspan="2" %)(% colspan="2" %)
251 (((
252 {{{communication_manager/rest/config/asterisk/{coreServerId}/extensions}}}
253 )))
254 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
255 (((
256 **Description**
257 )))|(((
258 Accesses all the extensions in the core server.
259 )))
260 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
261 (((
262 **GET**
263 )))|(((
264 Gets all the configuration for all the extensions in the system.
265 )))
266 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
267 (((
268 **POST
269 **
270 )))|(% colspan="1" %)(% colspan="1" %)
271 (((
272 Adds a extension to the configuration.
273
274 (% style="line-height: 1.42857;" %)**Errors:**
275
276 * 409 'An extension with the given id already exists.': Returned if an extension with the given id already exists.
277 * 409 'An extension with the given extension number already exists.': Returned if an extension with the given extension number already exists.
278 * 409 'An extension with the given peer already exists.': Returned if an extension with the given peer already exists.
279 * 412 'No extension provided.': Returned if no extension number was provided.
280 * 412 'No displayName provided.': Returned if no display name was provided.
281 * 412 'No peer provided.': Returned if no peer was provided.
282 * 412 'No altOriginationMethod provided.': Returned if no alternative origination method was provided.
283 * 412 'No agentLocation provided.': Returned if no agent location was provided.
284 * 412 'No agentInterface provided.': Returned if no agent interface was provided.
285 * 412 'No agentName provided.': Returned if no agent name was provided.
286 * 412 'No origingatingContextOverride provided.': Returned if no originating context override was provided.
287 * 412 'No redirectingContextOverride provided.': Returned if no originating context override was provided.
288 * 412 'No voiceMailBox provided.': Returned if no voicemail box was provided.
289 * 412 'No voicemailContext provided.': Returned if no voicemail context was provided.
290 )))
291 |(% colspan="2" %)(% colspan="2" %)
292 (((
293
294 )))
295 |=(% colspan="2" %)(% colspan="2" %)
296 (((
297 {{{communication_manager/rest/config/asterisk/{coreServerId}/extensions/{extensionId}}}}
298 )))
299 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
300 (((
301 **Description**
302 )))|(((
303 Accesses the configuration of a specific extension.
304
305 **Parameters:**
306
307 * extensionId: The configuration id of the extension.
308 )))
309 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
310 (((
311 **GET**
312 )))|(((
313 Gets the configuration of the specified extension.
314
315 **Errors:**
316
317 * 404 'An extension with the given id does not exist': Returned if no extension exists with the given id.
318 )))
319 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
320 (((
321 **PUT**
322 )))|(% colspan="1" %)(% colspan="1" %)
323 (((
324 Updates the specified extension configuration.
325
326 **Errors:**
327
328 * 404 'An extension with the given id does not exist': Returned if no queue exists with the given id.
329 * 409 'An extension with the given extension number already exists.': Returned if an extension with the given extension number already exists.
330 * 409 'An extension with the given peer already exists.': Returned if an extension with the given peer already exists.
331 * 412 'No extension provided.': Returned if no extension number was provided.
332 * 412 'No displayName provided.': Returned if no display name was provided.
333 * 412 'No peer provided.': Returned if no peer was provided.
334 * 412 'No altOriginationMethod provided.': Returned if no alternative origination method was provided.
335 * 412 'No agentLocation provided.': Returned if no agent location was provided.
336 * 412 'No agentInterface provided.': Returned if no agent interface was provided.
337 * 412 'No agentName provided.': Returned if no agent name was provided.
338 * 412 'No origingatingContextOverride provided.': Returned if no originating context override was provided.
339 * 412 'No redirectingContextOverride provided.': Returned if no originating context override was provided.
340 * 412 'No voiceMailBox provided.': Returned if no voicemail box was provided.
341 * 412 'No voicemailContext provided.': Returned if no voicemail context was provided.
342 )))
343 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
344 (((
345 **DELETE**
346 )))|(% colspan="1" %)(% colspan="1" %)
347 (((
348 Deletes the specified extension.
349
350 **Errors:**
351
352 * 404 'An extension with the given id does not exist': Returned if no extension exists with the given id.
353 )))
354
355 = Curl Examples =
356
357 === Get all extensions in a core server ===
358
359 {{code language="bash"}}
360 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions
361 {{/code}}
362
363 === Get the configuration for a specific extension ===
364
365 {{code language="bash"}}
366 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions/56cf70a3-1ee0-4b09-8f40-297430eeeddf
367 {{/code}}
368
369 === Add a new extension ===
370
371 {{code language="bash"}}
372 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"1584e59e-ce3c-4523-aa2d-af65c95fb29b","extension":"4224","displayName":"Sean","autoAnswer":false,"peer":"SIP/4224","altOriginationMethod":"","agentName":"Sean","agentLocation":"Local/4224@from-queue/n","agentInterface":"SIP/4224","agentPenalty":0,"agentPaused":false,"originatingContextOverride":"","redirectingContextOverride":"","originateTimeoutOverride":0,"voiceMailContext":"default","voiceMailBox":"4224"}' http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions
373 {{/code}}
374
375 === Delete an extension ===
376
377 {{code language="bash"}}
378 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions/56cf70a3-1ee0-4b09-8f40-297430eeeddf
379 {{/code}}
380
381 === Update an extension ===
382
383 {{code language="bash"}}
384 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","extension":"4224","displayName":"Sean new","autoAnswer":false,"peer":"SIP/4224","altOriginationMethod":"","agentName":"Sean","agentLocation":"Local/4224@from-queue/n","agentInterface":"SIP/4224","agentPenalty":0,"agentPaused":false,"originatingContextOverride":"","redirectingContextOverride":"","originateTimeoutOverride":0,"voiceMailContext":"default","voiceMailBox":"4224"}' http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions/c46f4e60-aba2-4340-a6a5-0c7304d40ba1
385 {{/code}}
386 {{/layout-cell}}
387 {{/layout-section}}
388 {{/layout}}