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 recording agent configuration REST resource allows access to the configuration for all recording agents connected to the server. This resource allows editing of the configuration of the connected recording agents.
15 {{/layout-cell}}
16
17 {{layout-cell}}
18 {{panel title="On this page:"}}
19
20
21 {{toc maxLevel="2" indent="1"/}}
22 {{/panel}}
23 {{/layout-cell}}
24 {{/layout-section}}
25
26 {{layout-section ac:type="single"}}
27 {{layout-cell}}
28 = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) =
29
30 {{code}}
31 communication_manager/rest/config/asterisk/recordingAgents
32 {{/code}}
33
34 = JSON Representation =
35
36 {{code}}
37 {
38 "id": "fba22843-c7a0-408f-8c4f-8f37ccdba76c",
39 "identifier": "local-rec",
40 "rootPath": "\/var\/spool\/asterisk\/monitor",
41 "fileNameMask": "${Tag(exten)}-${DstExtension}-${SrcExtension}-${Date(yyyyMMdd)}-${Time(HHmmss)}-${CDRUniqueId}",
42 "resourceHost": "pbx.mydomain.com",
43 "resourceExtension": "wav"
44 }
45 {{/code}}
46
47 |=(((
48 Property
49 )))|=(((
50 Type
51 )))|=(((
52 Description
53 )))
54 |(((
55 {{{id}}}
56 )))|(((
57 String
58 )))|(((
59 Configuration id of the recording agent.
60 )))
61 |(% colspan="1" %)(% colspan="1" %)
62 (((
63 identifier
64 )))|(% colspan="1" %)(% colspan="1" %)
65 (((
66 String
67 )))|(% colspan="1" %)(% colspan="1" %)
68 (((
69 The unique identifier of the recording agent.
70 )))
71 |(% colspan="1" %)(% colspan="1" %)
72 (((
73 rootPath
74 )))|(% colspan="1" %)(% colspan="1" %)
75 (((
76 String
77 )))|(% colspan="1" %)(% colspan="1" %)
78 (((
79 The path on the server where the recording files are stored.
80 )))
81 |(% colspan="1" %)(% colspan="1" %)
82 (((
83 {{{fileNameMask}}}
84 )))|(% colspan="1" %)(% colspan="1" %)
85 (((
86 String
87 )))|(% colspan="1" %)(% colspan="1" %)
88 (((
89 File name mask used to parse information out of the recording file names.
90 )))
91 |(% colspan="1" %)(% colspan="1" %)
92 (((
93 resourceHost
94 )))|(% colspan="1" %)(% colspan="1" %)
95 (((
96 String
97 )))|(% colspan="1" %)(% colspan="1" %)
98 (((
99 The host used to build the recording playback URLs for the client. Usually the publicly accessible IP or hostname of the phone system.
100 )))
101 |(% colspan="1" %)(% colspan="1" %)
102 (((
103 {{{resourceExtension}}}
104 )))|(% colspan="1" %)(% colspan="1" %)
105 (((
106 String
107 )))|(% colspan="1" %)(% colspan="1" %)
108 (((
109 File extension of the recording files.
110 )))
111
112 = Resource Paths =
113
114 |=(% colspan="2" %)(% colspan="2" %)
115 (((
116 {{{communication_manager/rest/config/asterisk/recordingAgents}}}
117 )))
118 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
119 (((
120 **Description**
121 )))|(((
122 Accesses all the recording agents connected to the server.
123 )))
124 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
125 (((
126 **GET**
127 )))|(((
128 Gets the configuration for all the recording agents connected to the server.
129 )))
130 |(% colspan="2" %)(% colspan="2" %)
131 (((
132
133 )))
134 |=(% colspan="2" %)(% colspan="2" %)
135 (((
136 {{{communication_manager/rest/config/asterisk/recordingAgents/{agentIdentifier}}}}
137 )))
138 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
139 (((
140 **Description**
141 )))|(((
142 Accesses a specific recording agent connected to the server.
143
144 **Parameters:**
145
146 * agentIdentifier: The unique identifier of the agent.
147 )))
148 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
149 (((
150 **GET**
151 )))|(((
152 Gets the configuration of the specified recording agent connected to the server.
153
154 **Errors:**
155
156 * 404 'A recording agent with the given identifier does not exist': Returned if no recording agent exists with the given identifier.
157 )))
158 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
159 (((
160 **PUT**
161 )))|(% colspan="1" %)(% colspan="1" %)
162 (((
163 Updates the configuration of the specified recording agent.
164
165 **Errors:**
166
167 * 404 'A recording agent with the given identifier does not exist': Returned if no recording agent exists with the given identifier.
168 * 412 'No rootPath provided.': Returned if no root path was provided.
169 * 412 'No resourceHost provided.': Returned if no resource host was provided.
170 * 412 'No resourceExtension provided.': Returned if no resource extension was provided.
171 )))
172
173 = Curl Examples =
174
175 === Get all recording agents connected to the server ===
176
177 {{code language="bash"}}
178 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/recordingAgents
179 {{/code}}
180
181 === Get the configuration for specific recording agent ===
182
183 {{code language="bash"}}
184 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/recordingAgents/local-rec
185 {{/code}}
186
187 === Update a recording agent configuration ===
188
189 {{code language="bash"}}
190 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"fba22843-c7a0-408f-8c4f-8f37ccdba76c","identifier":"local-rec","rootPath":"/var/spool/asterisk/monitor","fileNameMask":"${Tag(exten)}-${DstExtension}-${SrcExtension}-${Date(yyyyMMdd)}-${Time(HHmmss)}-${CDRUniqueId}","resourceHost":"pbx.mydomain.com","resourceExtension":"wav"}' http://localhost:58080/communication_manager/rest/config/asterisk/recordingAgents/local-rec
191 {{/code}}
192 {{/layout-cell}}
193 {{/layout-section}}
194 {{/layout}}
iSymphony