Wiki source code of Asterisk Queue Configuration

Last modified by ryanp on 2021/09/10 23:34

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 queue REST resource allows access to the configuration for queues in the system. This resource allows adding, removing, and updating of queues 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}/queues
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "id": "c46f4e60-aba2-4340-a6a5-0c7304d40ba1",
41 "displayName": "IncomingQ",
42 "identifier": "5001",
43 "destinationExtension": "5001",
44 "destinationContext": "from-internal",
45 "enabled": false,
46 "permissionDisplayName": "IncomingQ <5001>",
47 "permissionId": "c46f4e60-aba2-4340-a6a5-0c7304d40ba1"
48 }
49 {{/code}}
50
51 |=(((
52 Property
53 )))|=(((
54 Type
55 )))|=(((
56 Description
57 )))
58 |(((
59 {{{id}}}
60 )))|(((
61 String
62 )))|(((
63 Configuration id of the queue.
64 )))
65 |(% colspan="1" %)(% colspan="1" %)
66 (((
67 {{{displayName}}}
68 )))|(% colspan="1" %)(% colspan="1" %)
69 (((
70 String
71 )))|(% colspan="1" %)(% colspan="1" %)
72 (((
73 The display name of the queue.
74 )))
75 |(% colspan="1" %)(% colspan="1" %)
76 (((
77 identifier
78 )))|(% colspan="1" %)(% colspan="1" %)
79 (((
80 String
81 )))|(% colspan="1" %)(% colspan="1" %)
82 (((
83 The Asterisk identifier of the queue.
84 )))
85 |(% colspan="1" %)(% colspan="1" %)
86 (((
87 {{{destinationExtension}}}
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 String
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 The extension used to call the queue from the panel.
94 )))
95 |(% colspan="1" %)(% colspan="1" %)
96 (((
97 {{{destinationContext}}}
98 )))|(% colspan="1" %)(% colspan="1" %)
99 (((
100 String
101 )))|(% colspan="1" %)(% colspan="1" %)
102 (((
103 The context used to call the queue from the panel.
104 )))
105 |(% colspan="1" %)(% colspan="1" %)
106 (((
107 {{{enabled}}}
108 )))|(% colspan="1" %)(% colspan="1" %)
109 (((
110 Boolean
111 )))|(% colspan="1" %)(% colspan="1" %)
112 (((
113 Flag specifying if the queue is enabled or not.
114 )))
115 |(% colspan="1" %)(% colspan="1" %)
116 (((
117 {{{permissionDisplayName}}}
118 )))|(% colspan="1" %)(% colspan="1" %)
119 (((
120 String
121 )))|(% colspan="1" %)(% colspan="1" %)
122 (((
123 Display name of the queue in the permission system.
124 )))
125 |(% colspan="1" %)(% colspan="1" %)
126 (((
127 {{{permissionId}}}
128 )))|(% colspan="1" %)(% colspan="1" %)
129 (((
130 String
131 )))|(% colspan="1" %)(% colspan="1" %)
132 (((
133 Permission id of the queue.
134 )))
135
136 = Resource Paths =
137
138 |=(% colspan="2" %)(% colspan="2" %)
139 (((
140 {{{communication_manager/rest/config/asterisk/{coreServerId}/queues}}}
141 )))
142 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
143 (((
144 **Description**
145 )))|(((
146 Accesses all the queues in the core server.
147 )))
148 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
149 (((
150 **GET**
151 )))|(((
152 Gets all the configuration for all the queues in the system.
153 )))
154 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
155 (((
156 **POST
157 **
158 )))|(% colspan="1" %)(% colspan="1" %)
159 (((
160 Adds a queue to the configuration.
161
162 (% style="line-height: 1.42857;" %)**Errors:**
163
164 * 409 'A queue with the given id already exists.': Returned if a queue with the given id already exists.
165 * 409 'A queue with the given identifier already exists.': Returned if a queue with the given identifier already exists.
166 * 412 'No identifier provided.': Returned if no identifier was provided.
167 * 412 'No displayName provided.': Returned if no display name was provided.
168 * 412 'No destinationContext provided.': Returned if no destination context was provided.
169 * 412 'No destinationExtension provided.': Returned if no destination extension was provided.
170 )))
171 |(% colspan="2" %)(% colspan="2" %)
172 (((
173
174 )))
175 |=(% colspan="2" %)(% colspan="2" %)
176 (((
177 {{{communication_manager/rest/config/asterisk/{coreServerId}/queues/{queueId}}}}
178 )))
179 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
180 (((
181 **Description**
182 )))|(((
183 Accesses the configuration of a specific queue.
184
185 **Parameters:**
186
187 * queueId: The configuration id of the queue.
188 )))
189 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
190 (((
191 **GET**
192 )))|(((
193 Gets the configuration of the specified queue.
194
195 **Errors:**
196
197 * 404 'A queue with the given id does not exist': Returned if no queue exists with the given id.
198 )))
199 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
200 (((
201 **PUT**
202 )))|(% colspan="1" %)(% colspan="1" %)
203 (((
204 Updates the specified queue configuration.
205
206 **Errors:**
207
208 * 404 'A queue with the given id does not exist': Returned if no queue exists with the given id.
209 * 409 'A queue with the given identifier already exists.': Returned if a queue with the given identifier already exists.
210 * 412 'No identifier provided.': Returned if no identifier was provided.
211 * 412 'No displayName provided.': Returned if no display name was provided.
212 * 412 'No destinationContext provided.': Returned if no destination context was provided.
213 * 412 'No destinationExtension provided.': Returned if no destination extension was provided.
214 )))
215 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
216 (((
217 **DELETE**
218 )))|(% colspan="1" %)(% colspan="1" %)
219 (((
220 Deletes the specified queue.
221
222 **Errors:**
223
224 * 404 'A queue with the given id does not exist': Returned if no queue exists with the given id.
225 )))
226
227 = Curl Examples =
228
229 === Get all queues in a core server ===
230
231 {{code language="bash"}}
232 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues
233 {{/code}}
234
235 === Get the configuration for a specific queue ===
236
237 {{code language="bash"}}
238 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues/56cf70a3-1ee0-4b09-8f40-297430eeeddf
239 {{/code}}
240
241 === Add a new queue ===
242
243 {{code language="bash"}}
244 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","displayName":"IncomingQ","identifier":"5001","destinationExtension":"5001","destinationContext":"from-internal","enabled":false}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues
245 {{/code}}
246
247 === Delete a queue ===
248
249 {{code language="bash"}}
250 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues/56cf70a3-1ee0-4b09-8f40-297430eeeddf
251 {{/code}}
252
253 === Update a queue ===
254
255 {{code language="bash"}}
256 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","displayName":"IncomingQ","identifier":"5001","destinationExtension":"5001","destinationContext":"from-internal","enabled":false}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/queues/c46f4e60-aba2-4340-a6a5-0c7304d40ba1
257 {{/code}}
258 {{/layout-cell}}
259 {{/layout-section}}
260 {{/layout}}
iSymphony