feat: AudioSocket channel, application, and ARI support.
[asterisk/asterisk.git] / rest-api / api-docs / channels.json
1 {
2         "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
3         "_author": "David M. Lee, II <dlee@digium.com>",
4         "_svn_revision": "$Revision$",
5         "apiVersion": "2.0.0",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/ari",
8         "resourcePath": "/api-docs/channels.{format}",
9         "requiresModules": [
10                 "res_stasis_answer",
11                 "res_stasis_playback",
12                 "res_stasis_recording",
13                 "res_stasis_snoop"
14         ],
15         "apis": [
16                 {
17                         "path": "/channels",
18                         "description": "Active channels",
19                         "operations": [
20                                 {
21                                         "httpMethod": "GET",
22                                         "summary": "List all active channels in Asterisk.",
23                                         "nickname": "list",
24                                         "responseClass": "List[Channel]"
25                                 },
26                                 {
27                                         "httpMethod": "POST",
28                                         "summary": "Create a new channel (originate).",
29                                         "notes": "The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.",
30                                         "nickname": "originate",
31                                         "responseClass": "Channel",
32                                         "parameters": [
33                                                 {
34                                                         "name": "endpoint",
35                                                         "description": "Endpoint to call.",
36                                                         "paramType": "query",
37                                                         "required": true,
38                                                         "allowMultiple": false,
39                                                         "dataType": "string"
40                                                 },
41                                                 {
42                                                         "name": "extension",
43                                                         "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.",
44                                                         "paramType": "query",
45                                                         "required": false,
46                                                         "allowMultiple": false,
47                                                         "dataType": "string"
48                                                 },
49                                                 {
50                                                         "name": "context",
51                                                         "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.",
52                                                         "paramType": "query",
53                                                         "required": false,
54                                                         "allowMultiple": false,
55                                                         "dataType": "string"
56                                                 },
57                                                 {
58                                                         "name": "priority",
59                                                         "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.",
60                                                         "paramType": "query",
61                                                         "required": false,
62                                                         "allowMultiple": false,
63                                                         "dataType": "long"
64                                                 },
65                                                 {
66                                                         "name": "label",
67                                                         "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.",
68                                                         "paramType": "query",
69                                                         "required": false,
70                                                         "allowMultiple": false,
71                                                         "dataType": "string"
72                                                 },
73                                                 {
74                                                         "name": "app",
75                                                         "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.",
76                                                         "paramType": "query",
77                                                         "required": false,
78                                                         "allowMultiple": false,
79                                                         "dataType": "string"
80                                                 },
81                                                 {
82                                                         "name": "appArgs",
83                                                         "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.",
84                                                         "paramType": "query",
85                                                         "required": false,
86                                                         "allowMultiple": false,
87                                                         "dataType": "string"
88                                                 },
89                                                 {
90                                                         "name": "callerId",
91                                                         "description": "CallerID to use when dialing the endpoint or extension.",
92                                                         "paramType": "query",
93                                                         "required": false,
94                                                         "allowMultiple": false,
95                                                         "dataType": "string"
96                                                 },
97                                                 {
98                                                         "name": "timeout",
99                                                         "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.",
100                                                         "paramType": "query",
101                                                         "required": false,
102                                                         "allowMultiple": false,
103                                                         "dataType": "int",
104                                                         "defaultValue": 30
105                                                 },
106                                                 {
107                                                         "name": "variables",
108                                                         "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }",
109                                                         "paramType": "body",
110                                                         "required": false,
111                                                         "dataType": "containers",
112                                                         "allowMultiple": false
113                                                 },
114                                                 {
115                                                         "name": "channelId",
116                                                         "description": "The unique id to assign the channel on creation.",
117                                                         "paramType": "query",
118                                                         "required": false,
119                                                         "allowMultiple": false,
120                                                         "dataType": "string"
121                                                 },
122                                                 {
123                                                         "name": "otherChannelId",
124                                                         "description": "The unique id to assign the second channel when using local channels.",
125                                                         "paramType": "query",
126                                                         "required": false,
127                                                         "allowMultiple": false,
128                                                         "dataType": "string"
129                                                 },
130                                                 {
131                                                         "name": "originator",
132                                                         "description": "The unique id of the channel which is originating this one.",
133                                                         "paramType": "query",
134                                                         "required": false,
135                                                         "allowMultiple": false,
136                                                         "dataType": "string"
137                                                 },
138                                                 {
139                                                         "name": "formats",
140                                                         "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\".  Format names can be found with \"core show codecs\".",
141                                                         "paramType": "query",
142                                                         "required": false,
143                                                         "allowMultiple": false,
144                                                         "dataType": "string"
145                                                 }
146                                         ],
147                                         "errorResponses": [
148                                                 {
149                                                         "code": 400,
150                                                         "reason": "Invalid parameters for originating a channel."
151                                                 },
152                                                 {
153                                                         "code": 409,
154                                                         "reason": "Channel with given unique ID already exists."
155                                                 }
156                                         ]
157                                 }
158                         ]
159                 },
160                 {
161                         "path": "/channels/create",
162                         "description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.",
163                         "operations": [
164                                 {
165                                         "httpMethod": "POST",
166                                         "summary": "Create channel.",
167                                         "nickname": "create",
168                                         "responseClass": "Channel",
169                                         "parameters": [
170                                                 {
171                                                         "name": "endpoint",
172                                                         "description": "Endpoint for channel communication",
173                                                         "paramType": "query",
174                                                         "required": true,
175                                                         "allowMultiple": false,
176                                                         "dataType": "string"
177                                                 },
178                                                 {
179                                                         "name": "app",
180                                                         "description": "Stasis Application to place channel into",
181                                                         "paramType": "query",
182                                                         "required": true,
183                                                         "allowMultiple": false,
184                                                         "dataType": "string"
185                                                 },
186                                                 {
187                                                         "name": "appArgs",
188                                                         "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.",
189                                                         "paramType": "query",
190                                                         "required": false,
191                                                         "allowMultiple": false,
192                                                         "dataType": "string"
193                                                 },
194                                                 {
195                                                         "name": "channelId",
196                                                         "description": "The unique id to assign the channel on creation.",
197                                                         "paramType": "query",
198                                                         "required": false,
199                                                         "allowMultiple": false,
200                                                         "dataType": "string"
201                                                 },
202                                                 {
203                                                         "name": "otherChannelId",
204                                                         "description": "The unique id to assign the second channel when using local channels.",
205                                                         "paramType": "query",
206                                                         "required": false,
207                                                         "allowMultiple": false,
208                                                         "dataType": "string"
209                                                 },
210                                                 {
211                                                         "name": "originator",
212                                                         "description": "Unique ID of the calling channel",
213                                                         "paramType": "query",
214                                                         "required": false,
215                                                         "allowMultiple": false,
216                                                         "dataType": "string"
217                                                 },
218                                                 {
219                                                         "name": "formats",
220                                                         "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\".  Format names can be found with \"core show codecs\".",
221                                                         "paramType": "query",
222                                                         "required": false,
223                                                         "allowMultiple": false,
224                                                         "dataType": "string"
225                                                 }
226                                         ],
227                                         "errorResponses": [
228                                                 {
229                                                         "code": 409,
230                                                         "reason": "Channel with given unique ID already exists."
231                                                 }
232                                         ]
233                                 }
234                         ]
235                 },
236                 {
237                         "path": "/channels/{channelId}",
238                         "description": "Active channel",
239                         "operations": [
240                                 {
241                                         "httpMethod": "GET",
242                                         "summary": "Channel details.",
243                                         "nickname": "get",
244                                         "responseClass": "Channel",
245                                         "parameters": [
246                                                 {
247                                                         "name": "channelId",
248                                                         "description": "Channel's id",
249                                                         "paramType": "path",
250                                                         "required": true,
251                                                         "allowMultiple": false,
252                                                         "dataType": "string"
253                                                 }
254                                         ],
255                                         "errorResponses": [
256                                                 {
257                                                         "code": 404,
258                                                         "reason": "Channel not found"
259                                                 }
260                                         ]
261                                 },
262                                 {
263                                         "httpMethod": "POST",
264                                         "summary": "Create a new channel (originate with id).",
265                                         "notes": "The new channel is created immediately and a snapshot of it returned. If a Stasis application is provided it will be automatically subscribed to the originated channel for further events and updates.",
266                                         "nickname": "originateWithId",
267                                         "responseClass": "Channel",
268                                         "parameters": [
269                                                 {
270                                                         "name": "channelId",
271                                                         "description": "The unique id to assign the channel on creation.",
272                                                         "paramType": "path",
273                                                         "required": true,
274                                                         "allowMultiple": false,
275                                                         "dataType": "string"
276                                                 },
277                                                 {
278                                                         "name": "endpoint",
279                                                         "description": "Endpoint to call.",
280                                                         "paramType": "query",
281                                                         "required": true,
282                                                         "allowMultiple": false,
283                                                         "dataType": "string"
284                                                 },
285                                                 {
286                                                         "name": "extension",
287                                                         "description": "The extension to dial after the endpoint answers. Mutually exclusive with 'app'.",
288                                                         "paramType": "query",
289                                                         "required": false,
290                                                         "allowMultiple": false,
291                                                         "dataType": "string"
292                                                 },
293                                                 {
294                                                         "name": "context",
295                                                         "description": "The context to dial after the endpoint answers. If omitted, uses 'default'. Mutually exclusive with 'app'.",
296                                                         "paramType": "query",
297                                                         "required": false,
298                                                         "allowMultiple": false,
299                                                         "dataType": "string"
300                                                 },
301                                                 {
302                                                         "name": "priority",
303                                                         "description": "The priority to dial after the endpoint answers. If omitted, uses 1. Mutually exclusive with 'app'.",
304                                                         "paramType": "query",
305                                                         "required": false,
306                                                         "allowMultiple": false,
307                                                         "dataType": "long"
308                                                 },
309                                                 {
310                                                         "name": "label",
311                                                         "description": "The label to dial after the endpoint answers. Will supersede 'priority' if provided. Mutually exclusive with 'app'.",
312                                                         "paramType": "query",
313                                                         "required": false,
314                                                         "allowMultiple": false,
315                                                         "dataType": "string"
316                                                 },
317                                                 {
318                                                         "name": "app",
319                                                         "description": "The application that is subscribed to the originated channel. When the channel is answered, it will be passed to this Stasis application. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.",
320                                                         "paramType": "query",
321                                                         "required": false,
322                                                         "allowMultiple": false,
323                                                         "dataType": "string"
324                                                 },
325                                                 {
326                                                         "name": "appArgs",
327                                                         "description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.",
328                                                         "paramType": "query",
329                                                         "required": false,
330                                                         "allowMultiple": false,
331                                                         "dataType": "string"
332                                                 },
333                                                 {
334                                                         "name": "callerId",
335                                                         "description": "CallerID to use when dialing the endpoint or extension.",
336                                                         "paramType": "query",
337                                                         "required": false,
338                                                         "allowMultiple": false,
339                                                         "dataType": "string"
340                                                 },
341                                                 {
342                                                         "name": "timeout",
343                                                         "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.",
344                                                         "paramType": "query",
345                                                         "required": false,
346                                                         "allowMultiple": false,
347                                                         "dataType": "int",
348                                                         "defaultValue": 30
349                                                 },
350                                                 {
351                                                         "name": "variables",
352                                                         "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }",
353                                                         "paramType": "body",
354                                                         "required": false,
355                                                         "dataType": "containers",
356                                                         "allowMultiple": false
357                                                 },
358                                                 {
359                                                         "name": "otherChannelId",
360                                                         "description": "The unique id to assign the second channel when using local channels.",
361                                                         "paramType": "query",
362                                                         "required": false,
363                                                         "allowMultiple": false,
364                                                         "dataType": "string"
365                                                 },
366                                                 {
367                                                         "name": "originator",
368                                                         "description": "The unique id of the channel which is originating this one.",
369                                                         "paramType": "query",
370                                                         "required": false,
371                                                         "allowMultiple": false,
372                                                         "dataType": "string"
373                                                 },
374                                                 {
375                                                         "name": "formats",
376                                                         "description": "The format name capability list to use if originator is not specified. Ex. \"ulaw,slin16\".  Format names can be found with \"core show codecs\".",
377                                                         "paramType": "query",
378                                                         "required": false,
379                                                         "allowMultiple": false,
380                                                         "dataType": "string"
381                                                 }
382                                         ],
383                                         "errorResponses": [
384                                                 {
385                                                         "code": 400,
386                                                         "reason": "Invalid parameters for originating a channel."
387                                                 },
388                                                 {
389                                                         "code": 409,
390                                                         "reason": "Channel with given unique ID already exists."
391                                                 }
392                                         ]
393
394                                 },
395                                 {
396                                         "httpMethod": "DELETE",
397                                         "summary": "Delete (i.e. hangup) a channel.",
398                                         "nickname": "hangup",
399                                         "responseClass": "void",
400                                         "parameters": [
401                                                 {
402                                                         "name": "channelId",
403                                                         "description": "Channel's id",
404                                                         "paramType": "path",
405                                                         "required": true,
406                                                         "allowMultiple": false,
407                                                         "dataType": "string"
408                                                 },
409                                                 {
410                                                         "name": "reason_code",
411                                                         "description": "The reason code for hanging up the channel for detail use. Mutually exclusive with 'reason'. See detail hangup codes at here. https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings",
412                                                         "paramType": "query",
413                                                         "required": false,
414                                                         "allowMultiple": false,
415                                                         "dataType": "string"
416                                                 },
417                                                 {
418                                                         "name": "reason",
419                                                         "description": "Reason for hanging up the channel for simple use. Mutually exclusive with 'reason_code'.",
420                                                         "paramType": "query",
421                                                         "required": false,
422                                                         "allowMultiple": false,
423                                                         "dataType": "string",
424                                                         "allowableValues": {
425                                                                 "valueType": "LIST",
426                                                                 "values": [
427                                                                         "normal",
428                                                                         "busy",
429                                                                         "congestion",
430                                                                         "no_answer",
431                                                                         "timeout",
432                                                                         "rejected",
433                                                                         "unallocated",
434                                                                         "normal_unspecified",
435                                                                         "number_incomplete",
436                                                                         "codec_mismatch",
437                                                                         "interworking",
438                                                                         "failure",
439                                                                         "answered_elsewhere"
440                                                                 ]
441                                                         }
442                                                 }
443                                         ],
444                                         "errorResponses": [
445                                                 {
446                                                         "code": 400,
447                                                         "reason": "Invalid reason for hangup provided"
448                                                 },
449                                                 {
450                                                         "code": 404,
451                                                         "reason": "Channel not found"
452                                                 }
453                                         ]
454                                 }
455                         ]
456                 },
457                 {
458                         "path": "/channels/{channelId}/continue",
459                         "description": "Exit application; continue execution in the dialplan",
460                         "operations": [
461                                 {
462                                         "httpMethod": "POST",
463                                         "summary": "Exit application; continue execution in the dialplan.",
464                                         "nickname": "continueInDialplan",
465                                         "responseClass": "void",
466                                         "parameters": [
467                                                 {
468                                                         "name": "channelId",
469                                                         "description": "Channel's id",
470                                                         "paramType": "path",
471                                                         "required": true,
472                                                         "allowMultiple": false,
473                                                         "dataType": "string"
474                                                 },
475                                                 {
476                                                         "name": "context",
477                                                         "description": "The context to continue to.",
478                                                         "paramType": "query",
479                                                         "required": false,
480                                                         "allowMultiple": false,
481                                                         "dataType": "string"
482                                                 },
483                                                 {
484                                                         "name": "extension",
485                                                         "description": "The extension to continue to.",
486                                                         "paramType": "query",
487                                                         "required": false,
488                                                         "allowMultiple": false,
489                                                         "dataType": "string"
490                                                 },
491                                                 {
492                                                         "name": "priority",
493                                                         "description": "The priority to continue to.",
494                                                         "paramType": "query",
495                                                         "required": false,
496                                                         "allowMultiple": false,
497                                                         "dataType": "int"
498                                                 },
499                                                 {
500                                                         "name": "label",
501                                                         "description": "The label to continue to - will supersede 'priority' if both are provided.",
502                                                         "paramType": "query",
503                                                         "required": false,
504                                                         "allowMultiple": false,
505                                                         "dataType": "string"
506                                                 }
507                                         ],
508                                         "errorResponses": [
509                                                 {
510                                                         "code": 404,
511                                                         "reason": "Channel not found"
512                                                 },
513                                                 {
514                                                         "code": 409,
515                                                         "reason": "Channel not in a Stasis application"
516                                                 },
517                                                 {
518                                                         "code": 412,
519                                                         "reason": "Channel in invalid state"
520                                                 }
521                                         ]
522                                 }
523                         ]
524                 },
525                 {
526                         "path": "/channels/{channelId}/move",
527                         "description": "Move the channel from one Stasis application to another.",
528                         "operations": [
529                                 {
530                                         "httpMethod": "POST",
531                                         "summary": "Move the channel from one Stasis application to another.",
532                                         "nickname": "move",
533                                         "responseClass": "void",
534                                         "parameters": [
535                                                 {
536                                                         "name": "channelId",
537                                                         "description": "Channel's id",
538                                                         "paramType": "path",
539                                                         "required": true,
540                                                         "allowMultiple": false,
541                                                         "dataType": "string"
542                                                 },
543                                                 {
544                                                         "name": "app",
545                                                         "description": "The channel will be passed to this Stasis application.",
546                                                         "paramType": "query",
547                                                         "required": true,
548                                                         "allowMultiple": false,
549                                                         "dataType": "string"
550                                                 },
551                                                 {
552                                                         "name": "appArgs",
553                                                         "description": "The application arguments to pass to the Stasis application provided by 'app'.",
554                                                         "paramType": "query",
555                                                         "required": false,
556                                                         "allowMultiple": false,
557                                                         "dataType": "string"
558                                                 }
559                                         ],
560                                         "errorResponses": [
561                                                 {
562                                                         "code": "404",
563                                                         "reason": "Channel not found"
564                                                 },
565                                                 {
566                                                         "code": "409",
567                                                         "reason": "Channel not in a Stasis application"
568                                                 }
569                                         ]
570                                 }
571                         ]
572                 },
573                 {
574                         "path": "/channels/{channelId}/redirect",
575                         "description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.",
576                         "operations": [
577                                 {
578                                         "httpMethod": "POST",
579                                         "summary": "Redirect the channel to a different location.",
580                                         "nickname": "redirect",
581                                         "responseClass": "void",
582                                         "parameters": [
583                                                 {
584                                                         "name": "channelId",
585                                                         "description": "Channel's id",
586                                                         "paramType": "path",
587                                                         "required": true,
588                                                         "allowMultiple": false,
589                                                         "dataType": "string"
590                                                 },
591                                                 {
592                                                         "name": "endpoint",
593                                                         "description": "The endpoint to redirect the channel to",
594                                                         "paramType": "query",
595                                                         "required": true,
596                                                         "allowMultiple": false,
597                                                         "dataType": "string"
598                                                 }
599                                         ],
600                                         "errorResponses": [
601                                                 {
602                                                         "code": 400,
603                                                         "reason": "Endpoint parameter not provided"
604                                                 },
605                                                 {
606                                                         "code": 404,
607                                                         "reason": "Channel or endpoint not found"
608                                                 },
609                                                 {
610                                                         "code": 409,
611                                                         "reason": "Channel not in a Stasis application"
612                                                 },
613                                                 {
614                                                         "code": 422,
615                                                         "reason": "Endpoint is not the same type as the channel"
616                                                 },
617                                                 {
618                                                         "code": 412,
619                                                         "reason": "Channel in invalid state"
620                                                 }
621                                         ]
622                                 }
623                         ]
624                 },
625                 {
626                         "path": "/channels/{channelId}/answer",
627                         "description": "Answer a channel",
628                         "operations": [
629                                 {
630                                         "httpMethod": "POST",
631                                         "summary": "Answer a channel.",
632                                         "nickname": "answer",
633                                         "responseClass": "void",
634                                         "parameters": [
635                                                 {
636                                                         "name": "channelId",
637                                                         "description": "Channel's id",
638                                                         "paramType": "path",
639                                                         "required": true,
640                                                         "allowMultiple": false,
641                                                         "dataType": "string"
642                                                 }
643                                         ],
644                                         "errorResponses": [
645                                                 {
646                                                         "code": 404,
647                                                         "reason": "Channel not found"
648                                                 },
649                                                 {
650                                                         "code": 409,
651                                                         "reason": "Channel not in a Stasis application"
652                                                 },
653                                                 {
654                                                         "code": 412,
655                                                         "reason": "Channel in invalid state"
656                                                 }
657                                         ]
658                                 }
659                         ]
660                 },
661                 {
662                         "path": "/channels/{channelId}/ring",
663                         "description": "Send a ringing indication to a channel",
664                         "operations": [
665                                 {
666                                         "httpMethod": "POST",
667                                         "summary": "Indicate ringing to a channel.",
668                                         "nickname": "ring",
669                                         "responseClass": "void",
670                                         "parameters": [
671                                                 {
672                                                         "name": "channelId",
673                                                         "description": "Channel's id",
674                                                         "paramType": "path",
675                                                         "required": true,
676                                                         "allowMultiple": false,
677                                                         "dataType": "string"
678                                                 }
679                                         ],
680                                         "errorResponses": [
681                                                 {
682                                                         "code": 404,
683                                                         "reason": "Channel not found"
684                                                 },
685                                                 {
686                                                         "code": 409,
687                                                         "reason": "Channel not in a Stasis application"
688                                                 },
689                                                 {
690                                                         "code": 412,
691                                                         "reason": "Channel in invalid state"
692                                                 }
693                                         ]
694                                 },
695                                 {
696                                         "httpMethod": "DELETE",
697                                         "summary": "Stop ringing indication on a channel if locally generated.",
698                                         "nickname": "ringStop",
699                                         "responseClass": "void",
700                                         "parameters": [
701                                                 {
702                                                         "name": "channelId",
703                                                         "description": "Channel's id",
704                                                         "paramType": "path",
705                                                         "required": true,
706                                                         "allowMultiple": false,
707                                                         "dataType": "string"
708                                                 }
709                                         ],
710                                         "errorResponses": [
711                                                 {
712                                                         "code": 404,
713                                                         "reason": "Channel not found"
714                                                 },
715                                                 {
716                                                         "code": 409,
717                                                         "reason": "Channel not in a Stasis application"
718                                                 },
719                                                 {
720                                                         "code": 412,
721                                                         "reason": "Channel in invalid state"
722                                                 }
723                                         ]
724                                 }
725                         ]
726                 },
727                 {
728                         "path": "/channels/{channelId}/dtmf",
729                         "description": "Send DTMF to a channel",
730                         "operations": [
731                                 {
732                                         "httpMethod": "POST",
733                                         "summary": "Send provided DTMF to a given channel.",
734                                         "nickname": "sendDTMF",
735                                         "responseClass": "void",
736                                         "parameters": [
737                                                 {
738                                                         "name": "channelId",
739                                                         "description": "Channel's id",
740                                                         "paramType": "path",
741                                                         "required": true,
742                                                         "allowMultiple": false,
743                                                         "dataType": "string"
744                                                 },
745                                                 {
746                                                         "name": "dtmf",
747                                                         "description": "DTMF To send.",
748                                                         "paramType": "query",
749                                                         "required": false,
750                                                         "allowMultiple": false,
751                                                         "dataType": "string"
752                                                 },
753                                                 {
754                                                         "name": "before",
755                                                         "description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.",
756                                                         "paramType": "query",
757                                                         "required": false,
758                                                         "allowMultiple": false,
759                                                         "dataType": "int",
760                                                         "defaultValue": 0
761                                                 },
762                                                 {
763                                                         "name": "between",
764                                                         "description": "Amount of time in between DTMF digits (specified in milliseconds).",
765                                                         "paramType": "query",
766                                                         "required": false,
767                                                         "allowMultiple": false,
768                                                         "dataType": "int",
769                                                         "defaultValue": 100
770                                                 },
771                                                 {
772                                                         "name": "duration",
773                                                         "description": "Length of each DTMF digit (specified in milliseconds).",
774                                                         "paramType": "query",
775                                                         "required": false,
776                                                         "allowMultiple": false,
777                                                         "dataType": "int",
778                                                         "defaultValue": 100
779                                                 },
780                                                 {
781                                                         "name": "after",
782                                                         "description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.",
783                                                         "paramType": "query",
784                                                         "required": false,
785                                                         "allowMultiple": false,
786                                                         "dataType": "int",
787                                                         "defaultValue": 0
788                                                 }
789                                         ],
790                                         "errorResponses": [
791                                                 {
792                                                         "code": 400,
793                                                         "reason": "DTMF is required"
794                                                 },
795                                                 {
796                                                         "code": 404,
797                                                         "reason": "Channel not found"
798                                                 },
799                                                 {
800                                                         "code": 409,
801                                                         "reason": "Channel not in a Stasis application"
802                                                 },
803                                                 {
804                                                         "code": 412,
805                                                         "reason": "Channel in invalid state"
806                                                 }
807                                         ]
808                                 }
809                         ]
810                 },
811                 {
812                         "path": "/channels/{channelId}/mute",
813                         "description": "Mute a channel",
814                         "operations": [
815                                 {
816                                         "httpMethod": "POST",
817                                         "summary": "Mute a channel.",
818                                         "nickname": "mute",
819                                         "responseClass": "void",
820                                         "parameters": [
821                                                 {
822                                                         "name": "channelId",
823                                                         "description": "Channel's id",
824                                                         "paramType": "path",
825                                                         "required": true,
826                                                         "allowMultiple": false,
827                                                         "dataType": "string"
828                                                 },
829                                                 {
830                                                         "name": "direction",
831                                                         "description": "Direction in which to mute audio",
832                                                         "paramType": "query",
833                                                         "required": false,
834                                                         "allowMultiple": false,
835                                                         "dataType": "string",
836                                                         "defaultValue": "both",
837                                                         "allowableValues": {
838                                                                 "valueType": "LIST",
839                                                                 "values": [
840                                                                         "both",
841                                                                         "in",
842                                                                         "out"
843                                                                 ]
844                                                         }
845                                                 }
846                                         ],
847                                         "errorResponses": [
848                                                 {
849                                                         "code": 404,
850                                                         "reason": "Channel not found"
851                                                 },
852                                                 {
853                                                         "code": 409,
854                                                         "reason": "Channel not in a Stasis application"
855                                                 },
856                                                 {
857                                                         "code": 412,
858                                                         "reason": "Channel in invalid state"
859                                                 }
860                                         ]
861                                 },
862                                 {
863                                         "httpMethod": "DELETE",
864                                         "summary": "Unmute a channel.",
865                                         "nickname": "unmute",
866                                         "responseClass": "void",
867                                         "parameters": [
868                                                 {
869                                                         "name": "channelId",
870                                                         "description": "Channel's id",
871                                                         "paramType": "path",
872                                                         "required": true,
873                                                         "allowMultiple": false,
874                                                         "dataType": "string"
875                                                 },
876                                                 {
877                                                         "name": "direction",
878                                                         "description": "Direction in which to unmute audio",
879                                                         "paramType": "query",
880                                                         "required": false,
881                                                         "allowMultiple": false,
882                                                         "dataType": "string",
883                                                         "defaultValue": "both",
884                                                         "allowableValues": {
885                                                                 "valueType": "LIST",
886                                                                 "values": [
887                                                                         "both",
888                                                                         "in",
889                                                                         "out"
890                                                                 ]
891                                                         }
892                                                 }
893                                         ],
894                                         "errorResponses": [
895                                                 {
896                                                         "code": 404,
897                                                         "reason": "Channel not found"
898                                                 },
899                                                 {
900                                                         "code": 409,
901                                                         "reason": "Channel not in a Stasis application"
902                                                 },
903                                                 {
904                                                         "code": 412,
905                                                         "reason": "Channel in invalid state"
906                                                 }
907                                         ]
908                                 }
909                         ]
910                 },
911                 {
912                         "path": "/channels/{channelId}/hold",
913                         "description": "Put a channel on hold",
914                         "operations": [
915                                 {
916                                         "httpMethod": "POST",
917                                         "summary": "Hold a channel.",
918                                         "nickname": "hold",
919                                         "responseClass": "void",
920                                         "parameters": [
921                                                 {
922                                                         "name": "channelId",
923                                                         "description": "Channel's id",
924                                                         "paramType": "path",
925                                                         "required": true,
926                                                         "allowMultiple": false,
927                                                         "dataType": "string"
928                                                 }
929                                         ],
930                                         "errorResponses": [
931                                                 {
932                                                         "code": 404,
933                                                         "reason": "Channel not found"
934                                                 },
935                                                 {
936                                                         "code": 409,
937                                                         "reason": "Channel not in a Stasis application"
938                                                 },
939                                                 {
940                                                         "code": 412,
941                                                         "reason": "Channel in invalid state"
942                                                 }
943                                         ]
944                                 },
945                                 {
946                                         "httpMethod": "DELETE",
947                                         "summary": "Remove a channel from hold.",
948                                         "nickname": "unhold",
949                                         "responseClass": "void",
950                                         "parameters": [
951                                                 {
952                                                         "name": "channelId",
953                                                         "description": "Channel's id",
954                                                         "paramType": "path",
955                                                         "required": true,
956                                                         "allowMultiple": false,
957                                                         "dataType": "string"
958                                                 }
959                                         ],
960                                         "errorResponses": [
961                                                 {
962                                                         "code": 404,
963                                                         "reason": "Channel not found"
964                                                 },
965                                                 {
966                                                         "code": 409,
967                                                         "reason": "Channel not in a Stasis application"
968                                                 },
969                                                 {
970                                                         "code": 412,
971                                                         "reason": "Channel in invalid state"
972                                                 }
973                                         ]
974                                 }
975                         ]
976                 },
977                 {
978                         "path": "/channels/{channelId}/moh",
979                         "description": "Play music on hold to a channel",
980                         "operations": [
981                                 {
982                                         "httpMethod": "POST",
983                                         "summary": "Play music on hold to a channel.",
984                                         "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.",
985                                         "nickname": "startMoh",
986                                         "responseClass": "void",
987                                         "parameters": [
988                                                 {
989                                                         "name": "channelId",
990                                                         "description": "Channel's id",
991                                                         "paramType": "path",
992                                                         "required": true,
993                                                         "allowMultiple": false,
994                                                         "dataType": "string"
995                                                 },
996                                                 {
997                                                         "name": "mohClass",
998                                                         "description": "Music on hold class to use",
999                                                         "paramType": "query",
1000                                                         "required": false,
1001                                                         "allowMultiple": false,
1002                                                         "dataType": "string"
1003                                                 }
1004                                         ],
1005                                         "errorResponses": [
1006                                                 {
1007                                                         "code": 404,
1008                                                         "reason": "Channel not found"
1009                                                 },
1010                                                 {
1011                                                         "code": 409,
1012                                                         "reason": "Channel not in a Stasis application"
1013                                                 },
1014                                                 {
1015                                                         "code": 412,
1016                                                         "reason": "Channel in invalid state"
1017                                                 }
1018                                         ]
1019                                 },
1020                                 {
1021                                         "httpMethod": "DELETE",
1022                                         "summary": "Stop playing music on hold to a channel.",
1023                                         "nickname": "stopMoh",
1024                                         "responseClass": "void",
1025                                         "parameters": [
1026                                                 {
1027                                                         "name": "channelId",
1028                                                         "description": "Channel's id",
1029                                                         "paramType": "path",
1030                                                         "required": true,
1031                                                         "allowMultiple": false,
1032                                                         "dataType": "string"
1033                                                 }
1034                                         ],
1035                                         "errorResponses": [
1036                                                 {
1037                                                         "code": 404,
1038                                                         "reason": "Channel not found"
1039                                                 },
1040                                                 {
1041                                                         "code": 409,
1042                                                         "reason": "Channel not in a Stasis application"
1043                                                 },
1044                                                 {
1045                                                         "code": 412,
1046                                                         "reason": "Channel in invalid state"
1047                                                 }
1048                                         ]
1049                                 }
1050                         ]
1051                 },
1052                 {
1053                         "path": "/channels/{channelId}/silence",
1054                         "description": "Play silence to a channel",
1055                         "operations": [
1056                                 {
1057                                         "httpMethod": "POST",
1058                                         "summary": "Play silence to a channel.",
1059                                         "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.",
1060                                         "nickname": "startSilence",
1061                                         "responseClass": "void",
1062                                         "parameters": [
1063                                                 {
1064                                                         "name": "channelId",
1065                                                         "description": "Channel's id",
1066                                                         "paramType": "path",
1067                                                         "required": true,
1068                                                         "allowMultiple": false,
1069                                                         "dataType": "string"
1070                                                 }
1071                                         ],
1072                                         "errorResponses": [
1073                                                 {
1074                                                         "code": 404,
1075                                                         "reason": "Channel not found"
1076                                                 },
1077                                                 {
1078                                                         "code": 409,
1079                                                         "reason": "Channel not in a Stasis application"
1080                                                 },
1081                                                 {
1082                                                         "code": 412,
1083                                                         "reason": "Channel in invalid state"
1084                                                 }
1085                                         ]
1086                                 },
1087                                 {
1088                                         "httpMethod": "DELETE",
1089                                         "summary": "Stop playing silence to a channel.",
1090                                         "nickname": "stopSilence",
1091                                         "responseClass": "void",
1092                                         "parameters": [
1093                                                 {
1094                                                         "name": "channelId",
1095                                                         "description": "Channel's id",
1096                                                         "paramType": "path",
1097                                                         "required": true,
1098                                                         "allowMultiple": false,
1099                                                         "dataType": "string"
1100                                                 }
1101                                         ],
1102                                         "errorResponses": [
1103                                                 {
1104                                                         "code": 404,
1105                                                         "reason": "Channel not found"
1106                                                 },
1107                                                 {
1108                                                         "code": 409,
1109                                                         "reason": "Channel not in a Stasis application"
1110                                                 },
1111                                                 {
1112                                                         "code": 412,
1113                                                         "reason": "Channel in invalid state"
1114                                                 }
1115                                         ]
1116                                 }
1117                         ]
1118                 },
1119                 {
1120                         "path": "/channels/{channelId}/play",
1121                         "description": "Play media to a channel",
1122                         "operations": [
1123                                 {
1124                                         "httpMethod": "POST",
1125                                         "summary": "Start playback of media.",
1126                                         "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
1127                                         "nickname": "play",
1128                                         "responseClass": "Playback",
1129                                         "parameters": [
1130                                                 {
1131                                                         "name": "channelId",
1132                                                         "description": "Channel's id",
1133                                                         "paramType": "path",
1134                                                         "required": true,
1135                                                         "allowMultiple": false,
1136                                                         "dataType": "string"
1137                                                 },
1138                                                 {
1139                                                         "name": "media",
1140                                                         "description": "Media URIs to play.",
1141                                                         "paramType": "query",
1142                                                         "required": true,
1143                                                         "allowMultiple": true,
1144                                                         "dataType": "string"
1145                                                 },
1146                                                 {
1147                                                         "name": "lang",
1148                                                         "description": "For sounds, selects language for sound.",
1149                                                         "paramType": "query",
1150                                                         "required": false,
1151                                                         "allowMultiple": false,
1152                                                         "dataType": "string"
1153                                                 },
1154                                                 {
1155                                                         "name": "offsetms",
1156                                                         "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.",
1157                                                         "paramType": "query",
1158                                                         "required": false,
1159                                                         "allowMultiple": false,
1160                                                         "dataType": "int"
1161                                                 },
1162                                                 {
1163                                                         "name": "skipms",
1164                                                         "description": "Number of milliseconds to skip for forward/reverse operations.",
1165                                                         "paramType": "query",
1166                                                         "required": false,
1167                                                         "allowMultiple": false,
1168                                                         "dataType": "int",
1169                                                         "defaultValue": 3000
1170                                                 },
1171                                                 {
1172                                                         "name": "playbackId",
1173                                                         "description": "Playback ID.",
1174                                                         "paramType": "query",
1175                                                         "required": false,
1176                                                         "allowMultiple": false,
1177                                                         "dataType": "string"
1178                                                 }
1179                                         ],
1180                                         "errorResponses": [
1181                                                 {
1182                                                         "code": 404,
1183                                                         "reason": "Channel not found"
1184                                                 },
1185                                                 {
1186                                                         "code": 409,
1187                                                         "reason": "Channel not in a Stasis application"
1188                                                 },
1189                                                 {
1190                                                         "code": 412,
1191                                                         "reason": "Channel in invalid state"
1192                                                 }
1193                                         ]
1194                                 }
1195                         ]
1196                 },
1197                 {
1198                         "path": "/channels/{channelId}/play/{playbackId}",
1199                         "description": "Play media to a channel",
1200                         "operations": [
1201                                 {
1202                                         "httpMethod": "POST",
1203                                         "summary": "Start playback of media and specify the playbackId.",
1204                                         "notes": "The media URI may be any of a number of URI's. Currently sound:, recording:, number:, digits:, characters:, and tone: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
1205                                         "nickname": "playWithId",
1206                                         "responseClass": "Playback",
1207                                         "parameters": [
1208                                                 {
1209                                                         "name": "channelId",
1210                                                         "description": "Channel's id",
1211                                                         "paramType": "path",
1212                                                         "required": true,
1213                                                         "allowMultiple": false,
1214                                                         "dataType": "string"
1215                                                 },
1216                                                 {
1217                                                         "name": "playbackId",
1218                                                         "description": "Playback ID.",
1219                                                         "paramType": "path",
1220                                                         "required": true,
1221                                                         "allowMultiple": false,
1222                                                         "dataType": "string"
1223                                                 },
1224                                                 {
1225                                                         "name": "media",
1226                                                         "description": "Media URIs to play.",
1227                                                         "paramType": "query",
1228                                                         "required": true,
1229                                                         "allowMultiple": true,
1230                                                         "dataType": "string"
1231                                                 },
1232                                                 {
1233                                                         "name": "lang",
1234                                                         "description": "For sounds, selects language for sound.",
1235                                                         "paramType": "query",
1236                                                         "required": false,
1237                                                         "allowMultiple": false,
1238                                                         "dataType": "string"
1239                                                 },
1240                                                 {
1241                                                         "name": "offsetms",
1242                                                         "description": "Number of milliseconds to skip before playing. Only applies to the first URI if multiple media URIs are specified.",
1243                                                         "paramType": "query",
1244                                                         "required": false,
1245                                                         "allowMultiple": false,
1246                                                         "dataType": "int"
1247                                                 },
1248                                                 {
1249                                                         "name": "skipms",
1250                                                         "description": "Number of milliseconds to skip for forward/reverse operations.",
1251                                                         "paramType": "query",
1252                                                         "required": false,
1253                                                         "allowMultiple": false,
1254                                                         "dataType": "int",
1255                                                         "defaultValue": 3000
1256                                                 }
1257                                         ],
1258                                         "errorResponses": [
1259                                                 {
1260                                                         "code": 404,
1261                                                         "reason": "Channel not found"
1262                                                 },
1263                                                 {
1264                                                         "code": 409,
1265                                                         "reason": "Channel not in a Stasis application"
1266                                                 },
1267                                                 {
1268                                                         "code": 412,
1269                                                         "reason": "Channel in invalid state"
1270                                                 }
1271                                         ]
1272                                 }
1273                         ]
1274                 },
1275                 {
1276                         "path": "/channels/{channelId}/record",
1277                         "description": "Record audio from a channel",
1278                         "operations": [
1279                                 {
1280                                         "httpMethod": "POST",
1281                                         "summary": "Start a recording.",
1282                                         "notes": "Record audio from a channel. Note that this will not capture audio sent to the channel. The bridge itself has a record feature if that's what you want.",
1283                                         "nickname": "record",
1284                                         "responseClass": "LiveRecording",
1285                                         "parameters": [
1286                                                 {
1287                                                         "name": "channelId",
1288                                                         "description": "Channel's id",
1289                                                         "paramType": "path",
1290                                                         "required": true,
1291                                                         "allowMultiple": false,
1292                                                         "dataType": "string"
1293                                                 },
1294                                                 {
1295                                                         "name": "name",
1296                                                         "description": "Recording's filename",
1297                                                         "paramType": "query",
1298                                                         "required": true,
1299                                                         "allowMultiple": false,
1300                                                         "dataType": "string"
1301                                                 },
1302                                                 {
1303                                                         "name": "format",
1304                                                         "description": "Format to encode audio in",
1305                                                         "paramType": "query",
1306                                                         "required": true,
1307                                                         "allowMultiple": false,
1308                                                         "dataType": "string"
1309                                                 },
1310                                                 {
1311                                                         "name": "maxDurationSeconds",
1312                                                         "description": "Maximum duration of the recording, in seconds. 0 for no limit",
1313                                                         "paramType": "query",
1314                                                         "required": false,
1315                                                         "allowMultiple": false,
1316                                                         "dataType": "int",
1317                                                         "defaultValue": 0,
1318                                                         "allowableValues": {
1319                                                                 "valueType": "RANGE",
1320                                                                 "min": 0
1321                                                         }
1322                                                 },
1323                                                 {
1324                                                         "name": "maxSilenceSeconds",
1325                                                         "description": "Maximum duration of silence, in seconds. 0 for no limit",
1326                                                         "paramType": "query",
1327                                                         "required": false,
1328                                                         "allowMultiple": false,
1329                                                         "dataType": "int",
1330                                                         "defaultValue": 0,
1331                                                         "allowableValues": {
1332                                                                 "valueType": "RANGE",
1333                                                                 "min": 0
1334                                                         }
1335                                                 },
1336                                                 {
1337                                                         "name": "ifExists",
1338                                                         "description": "Action to take if a recording with the same name already exists.",
1339                                                         "paramType": "query",
1340                                                         "required": false,
1341                                                         "allowMultiple": false,
1342                                                         "dataType": "string",
1343                                                         "defaultValue": "fail",
1344                                                         "allowableValues": {
1345                                                                 "valueType": "LIST",
1346                                                                 "values": [
1347                                                                         "fail",
1348                                                                         "overwrite",
1349                                                                         "append"
1350                                                                 ]
1351                                                         }
1352                                                 },
1353                                                 {
1354                                                         "name": "beep",
1355                                                         "description": "Play beep when recording begins",
1356                                                         "paramType": "query",
1357                                                         "required": false,
1358                                                         "allowMultiple": false,
1359                                                         "dataType": "boolean",
1360                                                         "defaultValue": false
1361                                                 },
1362                                                 {
1363                                                         "name": "terminateOn",
1364                                                         "description": "DTMF input to terminate recording",
1365                                                         "paramType": "query",
1366                                                         "required": false,
1367                                                         "allowMultiple": false,
1368                                                         "dataType": "string",
1369                                                         "defaultValue": "none",
1370                                                         "allowableValues": {
1371                                                                 "valueType": "LIST",
1372                                                                 "values": [
1373                                                                         "none",
1374                                                                         "any",
1375                                                                         "*",
1376                                                                         "#"
1377                                                                 ]
1378                                                         }
1379                                                 }
1380                                         ],
1381                                         "errorResponses": [
1382                                                 {
1383                                                         "code": 400,
1384                                                         "reason": "Invalid parameters"
1385                                                 },
1386                                                 {
1387                                                         "code": 404,
1388                                                         "reason": "Channel not found"
1389                                                 },
1390                                                 {
1391                                                         "code": 409,
1392                                                         "reason": "Channel is not in a Stasis application; the channel is currently bridged with other hcannels; A recording with the same name already exists on the system and can not be overwritten because it is in progress or ifExists=fail"
1393                                                 },
1394                                                 {
1395                                                         "code": 422,
1396                                                         "reason": "The format specified is unknown on this system"
1397                                                 }
1398                                         ]
1399                                 }
1400                         ]
1401                 },
1402                 {
1403                         "path": "/channels/{channelId}/variable",
1404                         "description": "Variables on a channel",
1405                         "operations": [
1406                                 {
1407                                         "httpMethod": "GET",
1408                                         "summary": "Get the value of a channel variable or function.",
1409                                         "nickname": "getChannelVar",
1410                                         "responseClass": "Variable",
1411                                         "parameters": [
1412                                                 {
1413                                                         "name": "channelId",
1414                                                         "description": "Channel's id",
1415                                                         "paramType": "path",
1416                                                         "required": true,
1417                                                         "allowMultiple": false,
1418                                                         "dataType": "string"
1419                                                 },
1420                                                 {
1421                                                         "name": "variable",
1422                                                         "description": "The channel variable or function to get",
1423                                                         "paramType": "query",
1424                                                         "required": true,
1425                                                         "allowMultiple": false,
1426                                                         "dataType": "string"
1427                                                 }
1428                                         ],
1429                                         "errorResponses": [
1430                                                 {
1431                                                         "code": 400,
1432                                                         "reason": "Missing variable parameter."
1433                                                 },
1434                                                 {
1435                                                         "code": 404,
1436                                                         "reason": "Channel or variable not found"
1437                                                 },
1438                                                 {
1439                                                         "code": 409,
1440                                                         "reason": "Channel not in a Stasis application"
1441                                                 }
1442                                         ]
1443                                 },
1444                                 {
1445                                         "httpMethod": "POST",
1446                                         "summary": "Set the value of a channel variable or function.",
1447                                         "nickname": "setChannelVar",
1448                                         "responseClass": "void",
1449                                         "parameters": [
1450                                                 {
1451                                                         "name": "channelId",
1452                                                         "description": "Channel's id",
1453                                                         "paramType": "path",
1454                                                         "required": true,
1455                                                         "allowMultiple": false,
1456                                                         "dataType": "string"
1457                                                 },
1458                                                 {
1459                                                         "name": "variable",
1460                                                         "description": "The channel variable or function to set",
1461                                                         "paramType": "query",
1462                                                         "required": true,
1463                                                         "allowMultiple": false,
1464                                                         "dataType": "string"
1465                                                 },
1466                                                 {
1467                                                         "name": "value",
1468                                                         "description": "The value to set the variable to",
1469                                                         "paramType": "query",
1470                                                         "required": false,
1471                                                         "allowMultiple": false,
1472                                                         "dataType": "string"
1473                                                 }
1474                                         ],
1475                                         "errorResponses": [
1476                                                 {
1477                                                         "code": 400,
1478                                                         "reason": "Missing variable parameter."
1479                                                 },
1480                                                 {
1481                                                         "code": 404,
1482                                                         "reason": "Channel not found"
1483                                                 },
1484                                                 {
1485                                                         "code": 409,
1486                                                         "reason": "Channel not in a Stasis application"
1487                                                 }
1488                                         ]
1489                                 }
1490                         ]
1491                 },
1492                 {
1493                         "path": "/channels/{channelId}/snoop",
1494                         "description": "Snoop (spy/whisper) on a channel",
1495                         "operations": [
1496                                 {
1497                                         "httpMethod": "POST",
1498                                         "summary": "Start snooping.",
1499                                         "notes": "Snoop (spy/whisper) on a specific channel.",
1500                                         "nickname": "snoopChannel",
1501                                         "responseClass": "Channel",
1502                                         "parameters": [
1503                                                 {
1504                                                         "name": "channelId",
1505                                                         "description": "Channel's id",
1506                                                         "paramType": "path",
1507                                                         "required": true,
1508                                                         "allowMultiple": false,
1509                                                         "dataType": "string"
1510                                                 },
1511                                                 {
1512                                                         "name": "spy",
1513                                                         "description": "Direction of audio to spy on",
1514                                                         "paramType": "query",
1515                                                         "required": false,
1516                                                         "allowMultiple": false,
1517                                                         "dataType": "string",
1518                                                         "defaultValue": "none",
1519                                                         "allowableValues": {
1520                                                                 "valueType": "LIST",
1521                                                                 "values": [
1522                                                                         "none",
1523                                                                         "both",
1524                                                                         "out",
1525                                                                         "in"
1526                                                                 ]
1527                                                         }
1528                                                 },
1529                                                 {
1530                                                         "name": "whisper",
1531                                                         "description": "Direction of audio to whisper into",
1532                                                         "paramType": "query",
1533                                                         "required": false,
1534                                                         "allowMultiple": false,
1535                                                         "dataType": "string",
1536                                                         "defaultValue": "none",
1537                                                         "allowableValues": {
1538                                                                 "valueType": "LIST",
1539                                                                 "values": [
1540                                                                         "none",
1541                                                                         "both",
1542                                                                         "out",
1543                                                                         "in"
1544                                                                 ]
1545                                                         }
1546                                                 },
1547                                                 {
1548                                                         "name": "app",
1549                                                         "description": "Application the snooping channel is placed into",
1550                                                         "paramType": "query",
1551                                                         "required": true,
1552                                                         "allowMultiple": false,
1553                                                         "dataType": "string"
1554                                                 },
1555                                                 {
1556                                                         "name": "appArgs",
1557                                                         "description": "The application arguments to pass to the Stasis application",
1558                                                         "paramType": "query",
1559                                                         "required": false,
1560                                                         "allowMultiple": false,
1561                                                         "dataType": "string"
1562                                                 },
1563                                                 {
1564                                                         "name": "snoopId",
1565                                                         "description": "Unique ID to assign to snooping channel",
1566                                                         "paramType": "query",
1567                                                         "required": false,
1568                                                         "allowMultiple": false,
1569                                                         "dataType": "string"
1570                                                 }
1571                                         ],
1572                                         "errorResponses": [
1573                                                 {
1574                                                         "code": 400,
1575                                                         "reason": "Invalid parameters"
1576                                                 },
1577                                                 {
1578                                                         "code": 404,
1579                                                         "reason": "Channel not found"
1580                                                 }
1581                                         ]
1582                                 }
1583                         ]
1584                 },
1585                 {
1586                         "path": "/channels/{channelId}/snoop/{snoopId}",
1587                         "description": "Snoop (spy/whisper) on a channel",
1588                         "operations": [
1589                                 {
1590                                         "httpMethod": "POST",
1591                                         "summary": "Start snooping.",
1592                                         "notes": "Snoop (spy/whisper) on a specific channel.",
1593                                         "nickname": "snoopChannelWithId",
1594                                         "responseClass": "Channel",
1595                                         "parameters": [
1596                                                 {
1597                                                         "name": "channelId",
1598                                                         "description": "Channel's id",
1599                                                         "paramType": "path",
1600                                                         "required": true,
1601                                                         "allowMultiple": false,
1602                                                         "dataType": "string"
1603                                                 },
1604                                                 {
1605                                                         "name": "snoopId",
1606                                                         "description": "Unique ID to assign to snooping channel",
1607                                                         "paramType": "path",
1608                                                         "required": true,
1609                                                         "allowMultiple": false,
1610                                                         "dataType": "string"
1611                                                 },
1612                                                 {
1613                                                         "name": "spy",
1614                                                         "description": "Direction of audio to spy on",
1615                                                         "paramType": "query",
1616                                                         "required": false,
1617                                                         "allowMultiple": false,
1618                                                         "dataType": "string",
1619                                                         "defaultValue": "none",
1620                                                         "allowableValues": {
1621                                                                 "valueType": "LIST",
1622                                                                 "values": [
1623                                                                         "none",
1624                                                                         "both",
1625                                                                         "out",
1626                                                                         "in"
1627                                                                 ]
1628                                                         }
1629                                                 },
1630                                                 {
1631                                                         "name": "whisper",
1632                                                         "description": "Direction of audio to whisper into",
1633                                                         "paramType": "query",
1634                                                         "required": false,
1635                                                         "allowMultiple": false,
1636                                                         "dataType": "string",
1637                                                         "defaultValue": "none",
1638                                                         "allowableValues": {
1639                                                                 "valueType": "LIST",
1640                                                                 "values": [
1641                                                                         "none",
1642                                                                         "both",
1643                                                                         "out",
1644                                                                         "in"
1645                                                                 ]
1646                                                         }
1647                                                 },
1648                                                 {
1649                                                         "name": "app",
1650                                                         "description": "Application the snooping channel is placed into",
1651                                                         "paramType": "query",
1652                                                         "required": true,
1653                                                         "allowMultiple": false,
1654                                                         "dataType": "string"
1655                                                 },
1656                                                 {
1657                                                         "name": "appArgs",
1658                                                         "description": "The application arguments to pass to the Stasis application",
1659                                                         "paramType": "query",
1660                                                         "required": false,
1661                                                         "allowMultiple": false,
1662                                                         "dataType": "string"
1663                                                 }
1664                                         ],
1665                                         "errorResponses": [
1666                                                 {
1667                                                         "code": 400,
1668                                                         "reason": "Invalid parameters"
1669                                                 },
1670                                                 {
1671                                                         "code": 404,
1672                                                         "reason": "Channel not found"
1673                                                 }
1674                                         ]
1675                                 }
1676                         ]
1677                 },
1678                 {
1679                         "path": "/channels/{channelId}/dial",
1680                         "description": "Dial a channel",
1681                         "operations": [
1682                                 {
1683                                         "httpMethod": "POST",
1684                                         "summary": "Dial a created channel.",
1685                                         "nickname": "dial",
1686                                         "responseClass": "void",
1687                                         "parameters": [
1688                                                 {
1689                                                         "name": "channelId",
1690                                                         "description": "Channel's id",
1691                                                         "paramType": "path",
1692                                                         "required": true,
1693                                                         "allowMultiple": false,
1694                                                         "dataType": "string"
1695                                                 },
1696                                                 {
1697                                                         "name": "caller",
1698                                                         "description": "Channel ID of caller",
1699                                                         "paramType": "query",
1700                                                         "required": false,
1701                                                         "allowMultiple": false,
1702                                                         "dataType": "string"
1703                                                 },
1704                                                 {
1705                                                         "name": "timeout",
1706                                                         "description": "Dial timeout",
1707                                                         "paramType": "query",
1708                                                         "required": false,
1709                                                         "allowMultiple": false,
1710                                                         "dataType": "int",
1711                                                         "defaultValue": 0,
1712                                                         "allowableValues": {
1713                                                                 "valueType": "RANGE",
1714                                                                 "min": 0
1715                                                         }
1716                                                 }
1717                                         ],
1718                                         "errorResponses": [
1719                                                 {
1720                                                         "code": 404,
1721                                                         "reason": "Channel cannot be found."
1722                                                 },
1723                                                 {
1724                                                         "code": 409,
1725                                                         "reason": "Channel cannot be dialed."
1726                                                 }
1727                                         ]
1728                                 }
1729                         ]
1730                 },
1731                 {
1732                         "path": "/channels/{channelId}/rtp_statistics",
1733                         "description": "Get RTP statistics information for RTP on a channel",
1734                         "operations": [
1735                                 {
1736                                         "httpMethod": "GET",
1737                                         "summary": "RTP stats on a channel.",
1738                                         "nickname": "rtpstatistics",
1739                                         "responseClass": "RTPstat",
1740                                         "parameters": [
1741                                                 {
1742                                                         "name": "channelId",
1743                                                         "description": "Channel's id",
1744                                                         "paramType": "path",
1745                                                         "required": true,
1746                                                         "allowMultiple": false,
1747                                                         "dataType": "string"
1748                                                 }
1749                                         ],
1750                                         "errorResponses": [
1751                                                 {
1752                                                         "code": 404,
1753                                                         "reason": "Channel cannot be found."
1754                                                 }
1755                                         ]
1756                                 }
1757                         ]
1758                 },
1759                 {
1760                         "path": "/channels/externalMedia",
1761                         "description": "Create a channel to an External Media source/sink.",
1762                         "operations": [
1763                                 {
1764                                         "httpMethod": "POST",
1765                                         "summary": "Start an External Media session.",
1766                                         "notes": "Create a channel to an External Media source/sink.",
1767                                         "nickname": "externalMedia",
1768                                         "responseClass": "Channel",
1769                                         "parameters": [
1770                                                 {
1771                                                         "name": "channelId",
1772                                                         "description": "The unique id to assign the channel on creation.",
1773                                                         "paramType": "query",
1774                                                         "required": false,
1775                                                         "allowMultiple": false,
1776                                                         "dataType": "string"
1777                                                 },
1778                                                 {
1779                                                         "name": "app",
1780                                                         "description": "Stasis Application to place channel into",
1781                                                         "paramType": "query",
1782                                                         "required": true,
1783                                                         "allowMultiple": false,
1784                                                         "dataType": "string"
1785                                                 },
1786                                                 {
1787                                                         "name": "variables",
1788                                                         "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }",
1789                                                         "paramType": "body",
1790                                                         "required": false,
1791                                                         "dataType": "containers",
1792                                                         "allowMultiple": false
1793                                                 },
1794                                                 {
1795                                                         "name": "external_host",
1796                                                         "description": "Hostname/ip:port of external host",
1797                                                         "paramType": "query",
1798                                                         "required": true,
1799                                                         "allowMultiple": false,
1800                                                         "dataType": "string"
1801                                                 },
1802                                                 {
1803                                                         "name": "encapsulation",
1804                                                         "description": "Payload encapsulation protocol",
1805                                                         "paramType": "query",
1806                                                         "required": false,
1807                                                         "allowMultiple": false,
1808                                                         "dataType": "string",
1809                                                         "defaultValue": "rtp",
1810                                                         "allowableValues": {
1811                                                                 "valueType": "LIST",
1812                                                                 "values": [
1813                                                                         "rtp",
1814                                                                         "audiosocket"
1815                                                                 ]
1816                                                         }
1817                                                 },
1818                                                 {
1819                                                         "name": "transport",
1820                                                         "description": "Transport protocol",
1821                                                         "paramType": "query",
1822                                                         "required": false,
1823                                                         "allowMultiple": false,
1824                                                         "dataType": "string",
1825                                                         "defaultValue": "udp",
1826                                                         "allowableValues": {
1827                                                                 "valueType": "LIST",
1828                                                                 "values": [
1829                                                                         "udp",
1830                                                                         "tcp"
1831                                                                 ]
1832                                                         }
1833                                                 },
1834                                                 {
1835                                                         "name": "connection_type",
1836                                                         "description": "Connection type (client/server)",
1837                                                         "paramType": "query",
1838                                                         "required": false,
1839                                                         "allowMultiple": false,