Wiki source code of Asterisk Voicemail Agent Configuration
Last modified by ryanp on 2021/09/10 23:34
Show last authors
author | version | line-number | content |
---|---|---|---|
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 voicemail agent configuration REST resource allows access to the configuration for all voicemail agents connected to the server. This resource allows editing of the configuration of the connected voicemail 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/voicemailAgents | ||
32 | {{/code}} | ||
33 | |||
34 | = JSON Representation = | ||
35 | |||
36 | {{code}} | ||
37 | { | ||
38 | "id": "b3116fa0-ccf9-46c5-911e-3ab489565b74", | ||
39 | "identifier": "local-vm", | ||
40 | "rootPath": "\/var\/spool\/asterisk\/voicemail", | ||
41 | "resourceHost": "pbx.mydomain.com", | ||
42 | "resourceExtension": "wav" | ||
43 | } | ||
44 | {{/code}} | ||
45 | |||
46 | |=((( | ||
47 | Property | ||
48 | )))|=((( | ||
49 | Type | ||
50 | )))|=((( | ||
51 | Description | ||
52 | ))) | ||
53 | |((( | ||
54 | {{{id}}} | ||
55 | )))|((( | ||
56 | String | ||
57 | )))|((( | ||
58 | Configuration id of the voicemail agent. | ||
59 | ))) | ||
60 | |(% colspan="1" %)(% colspan="1" %) | ||
61 | ((( | ||
62 | identifier | ||
63 | )))|(% colspan="1" %)(% colspan="1" %) | ||
64 | ((( | ||
65 | String | ||
66 | )))|(% colspan="1" %)(% colspan="1" %) | ||
67 | ((( | ||
68 | The unique identifier of the voicemail agent. | ||
69 | ))) | ||
70 | |(% colspan="1" %)(% colspan="1" %) | ||
71 | ((( | ||
72 | rootPath | ||
73 | )))|(% colspan="1" %)(% colspan="1" %) | ||
74 | ((( | ||
75 | String | ||
76 | )))|(% colspan="1" %)(% colspan="1" %) | ||
77 | ((( | ||
78 | The path on the server where the voicemail files are stored. | ||
79 | ))) | ||
80 | |(% colspan="1" %)(% colspan="1" %) | ||
81 | ((( | ||
82 | resourceHost | ||
83 | )))|(% colspan="1" %)(% colspan="1" %) | ||
84 | ((( | ||
85 | String | ||
86 | )))|(% colspan="1" %)(% colspan="1" %) | ||
87 | ((( | ||
88 | The host used to build the voicemail playback URLs for the client. Usually the publicly accessible IP or hostname of the phone system. | ||
89 | ))) | ||
90 | |(% colspan="1" %)(% colspan="1" %) | ||
91 | ((( | ||
92 | {{{resourceExtension}}} | ||
93 | )))|(% colspan="1" %)(% colspan="1" %) | ||
94 | ((( | ||
95 | String | ||
96 | )))|(% colspan="1" %)(% colspan="1" %) | ||
97 | ((( | ||
98 | File extension of the voicemail files. | ||
99 | ))) | ||
100 | |||
101 | = Resource Paths = | ||
102 | |||
103 | |=(% colspan="2" %)(% colspan="2" %) | ||
104 | ((( | ||
105 | {{{communication_manager/rest/config/asterisk/voicemailAgents}}} | ||
106 | ))) | ||
107 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
108 | ((( | ||
109 | **Description** | ||
110 | )))|((( | ||
111 | Accesses all the voicemail agents connected to the server. | ||
112 | ))) | ||
113 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
114 | ((( | ||
115 | **GET** | ||
116 | )))|((( | ||
117 | Gets the configuration for all the voicemail agents connected to the server. | ||
118 | ))) | ||
119 | |(% colspan="2" %)(% colspan="2" %) | ||
120 | ((( | ||
121 | |||
122 | ))) | ||
123 | |=(% colspan="2" %)(% colspan="2" %) | ||
124 | ((( | ||
125 | {{{communication_manager/rest/config/asterisk/voicemailAgents/{agentIdentifier}}}} | ||
126 | ))) | ||
127 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
128 | ((( | ||
129 | **Description** | ||
130 | )))|((( | ||
131 | Accesses a specific voicemail agent connected to the server. | ||
132 | |||
133 | **Parameters:** | ||
134 | |||
135 | * agentIdentifier: The unique identifier of the agent. | ||
136 | ))) | ||
137 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
138 | ((( | ||
139 | **GET** | ||
140 | )))|((( | ||
141 | Gets the configuration of the specified voicemail agent connected to the server. | ||
142 | |||
143 | **Errors:** | ||
144 | |||
145 | * 404 'A voicemail agent with the given identifier does not exist': Returned if no voicemail agent exists with the given identifier. | ||
146 | ))) | ||
147 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
148 | ((( | ||
149 | **PUT** | ||
150 | )))|(% colspan="1" %)(% colspan="1" %) | ||
151 | ((( | ||
152 | Updates the configuration of the specified voicemail agent. | ||
153 | |||
154 | **Errors:** | ||
155 | |||
156 | * 404 'A voicemail agent with the given identifier does not exist': Returned if no voicemail agent exists with the given identifier. | ||
157 | * 412 'No rootPath provided.': Returned if no root path was provided. | ||
158 | * 412 'No resourceHost provided.': Returned if no resource host was provided. | ||
159 | * 412 'No resourceExtension provided.': Returned if no resource extension was provided. | ||
160 | ))) | ||
161 | |||
162 | = Curl Examples = | ||
163 | |||
164 | === Get all voicemail agents connected to the server === | ||
165 | |||
166 | {{code language="bash"}} | ||
167 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/voicemailAgents | ||
168 | {{/code}} | ||
169 | |||
170 | === Get the configuration for specific voicemail agent === | ||
171 | |||
172 | {{code language="bash"}} | ||
173 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/voicemailAgents/local-vm | ||
174 | {{/code}} | ||
175 | |||
176 | === Update a voicemail agent configuration === | ||
177 | |||
178 | {{code language="bash"}} | ||
179 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"b3116fa0-ccf9-46c5-911e-3ab489565b74","identifier":"local-vm","rootPath":"../misc-internals/conf/voicemail/backup","resourceHost":"pbx.mydomain.com","resourceExtension":"wav"}' http://localhost:58080/communication_manager/rest/config/asterisk/voicemailAgents/local-vm | ||
180 | {{/code}} | ||
181 | {{/layout-cell}} | ||
182 | {{/layout-section}} | ||
183 | {{/layout}} |