7d22c41fb676cade42105bad122d694bd1eeedea
[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": "0.0.1",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/stasis",
8         "resourcePath": "/api-docs/channels.{format}",
9         "apis": [
10                 {
11                         "path": "/channels",
12                         "description": "Active channels",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "summary": "List all active channels in Asterisk.",
17                                         "nickname": "getChannels",
18                                         "responseClass": "List[Channel]"
19                                 },
20                                 {
21                                         "httpMethod": "POST",
22                                         "summary": "Create a new channel (originate).",
23                                         "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.",
24                                         "nickname": "originate",
25                                         "responseClass": "Channel",
26                                         "parameters": [
27                                                 {
28                                                         "name": "endpoint",
29                                                         "description": "Endpoint to call.",
30                                                         "paramType": "query",
31                                                         "required": true,
32                                                         "allowMultiple": false,
33                                                         "dataType": "string"
34                                                 },
35                                                 {
36                                                         "name": "extension",
37                                                         "description": "The extension to dial after the endpoint answers",
38                                                         "paramType": "query",
39                                                         "required": false,
40                                                         "allowMultiple": false,
41                                                         "dataType": "string"
42                                                 },
43                                                 {
44                                                         "name": "context",
45                                                         "description": "The context to dial after the endpoint answers. If omitted, uses 'default'",
46                                                         "paramType": "query",
47                                                         "required": false,
48                                                         "allowMultiple": false,
49                                                         "dataType": "string"
50                                                 },
51                                                 {
52                                                         "name": "priority",
53                                                         "description": "The priority to dial after the endpoint answers. If omitted, uses 1",
54                                                         "paramType": "query",
55                                                         "required": false,
56                                                         "allowMultiple": false,
57                                                         "dataType": "long"
58                                                 },
59                                                 {
60                                                         "name": "app",
61                                                         "description": "The application that is subscribed to the originated channel, and passed to the Stasis application.",
62                                                         "paramType": "query",
63                                                         "required": false,
64                                                         "allowMultiple": false,
65                                                         "dataType": "string"
66                                                 },
67                                                 {
68                                                         "name": "appArgs",
69                                                         "description": "The application arguments to pass to the Stasis application.",
70                                                         "paramType": "query",
71                                                         "required": false,
72                                                         "allowMultiple": false,
73                                                         "dataType": "string"
74                                                 },
75                                                 {
76                                                         "name": "callerId",
77                                                         "description": "CallerID to use when dialing the endpoint or extension.",
78                                                         "paramType": "query",
79                                                         "required": false,
80                                                         "allowMultiple": false,
81                                                         "dataType": "string"
82                                                 },
83                                                 {
84                                                         "name": "timeout",
85                                                         "description": "Timeout (in seconds) before giving up dialing, or -1 for no timeout.",
86                                                         "paramType": "query",
87                                                         "required": false,
88                                                         "allowMultiple": false,
89                                                         "dataType": "int",
90                                                         "defaultValue": 30
91                                                 }
92                                         ],
93                                         "errorResponses": [
94                                                 {
95                                                         "code": 400,
96                                                         "reason": "Invalid parameters for originating a channel."
97                                                 }
98                                         ]
99                                 }
100                         ]
101                 },
102                 {
103                         "path": "/channels/{channelId}",
104                         "description": "Active channel",
105                         "operations": [
106                                 {
107                                         "httpMethod": "GET",
108                                         "summary": "Channel details.",
109                                         "nickname": "getChannel",
110                                         "responseClass": "Channel",
111                                         "parameters": [
112                                                 {
113                                                         "name": "channelId",
114                                                         "description": "Channel's id",
115                                                         "paramType": "path",
116                                                         "required": true,
117                                                         "allowMultiple": false,
118                                                         "dataType": "string"
119                                                 }
120                                         ],
121                                         "errorResponses": [
122                                                 {
123                                                         "code": 404,
124                                                         "reason": "Channel not found"
125                                                 }
126                                         ]
127                                 },
128                                 {
129                                         "httpMethod": "DELETE",
130                                         "summary": "Delete (i.e. hangup) a channel.",
131                                         "nickname": "deleteChannel",
132                                         "responseClass": "void",
133                                         "parameters": [
134                                                 {
135                                                         "name": "channelId",
136                                                         "description": "Channel's id",
137                                                         "paramType": "path",
138                                                         "required": true,
139                                                         "allowMultiple": false,
140                                                         "dataType": "string"
141                                                 }
142                                         ],
143                                         "errorResponses": [
144                                                 {
145                                                         "code": 404,
146                                                         "reason": "Channel not found"
147                                                 }
148                                         ]
149                                 }
150                         ]
151                 },
152                 {
153                         "path": "/channels/{channelId}/continue",
154                         "description": "Exit application; continue execution in the dialplan",
155                         "operations": [
156                                 {
157                                         "httpMethod": "POST",
158                                         "summary": "Exit application; continue execution in the dialplan.",
159                                         "nickname": "continueInDialplan",
160                                         "responseClass": "void",
161                                         "parameters": [
162                                                 {
163                                                         "name": "channelId",
164                                                         "description": "Channel's id",
165                                                         "paramType": "path",
166                                                         "required": true,
167                                                         "allowMultiple": false,
168                                                         "dataType": "string"
169                                                 },
170                                                 {
171                                                         "name": "context",
172                                                         "description": "The context to continue to.",
173                                                         "paramType": "query",
174                                                         "required": false,
175                                                         "allowMultiple": false,
176                                                         "dataType": "string"
177                                                 },
178                                                 {
179                                                         "name": "extension",
180                                                         "description": "The extension to continue to.",
181                                                         "paramType": "query",
182                                                         "required": false,
183                                                         "allowMultiple": false,
184                                                         "dataType": "string"
185                                                 },
186                                                 {
187                                                         "name": "priority",
188                                                         "description": "The priority to continue to.",
189                                                         "paramType": "query",
190                                                         "required": false,
191                                                         "allowMultiple": false,
192                                                         "dataType": "int"
193                                                 }
194                                         ],
195                                         "errorResponses": [
196                                                 {
197                                                         "code": 404,
198                                                         "reason": "Channel not found"
199                                                 },
200                                                 {
201                                                         "code": 409,
202                                                         "reason": "Channel not in a Stasis application"
203                                                 }
204                                         ]
205                                 }
206                         ]
207                 },
208                 {
209                         "path": "/channels/{channelId}/answer",
210                         "description": "Answer a channel",
211                         "operations": [
212                                 {
213                                         "httpMethod": "POST",
214                                         "summary": "Answer a channel.",
215                                         "nickname": "answerChannel",
216                                         "responseClass": "void",
217                                         "parameters": [
218                                                 {
219                                                         "name": "channelId",
220                                                         "description": "Channel's id",
221                                                         "paramType": "path",
222                                                         "required": true,
223                                                         "allowMultiple": false,
224                                                         "dataType": "string"
225                                                 }
226                                         ],
227                                         "errorResponses": [
228                                                 {
229                                                         "code": 404,
230                                                         "reason": "Channel not found"
231                                                 },
232                                                 {
233                                                         "code": 409,
234                                                         "reason": "Channel not in a Stasis application"
235                                                 }
236                                         ]
237                                 }
238                         ]
239                 },
240                 {
241                         "path": "/channels/{channelId}/mute",
242                         "description": "Mute a channel",
243                         "operations": [
244                                 {
245                                         "httpMethod": "POST",
246                                         "summary": "Mute a channel.",
247                                         "nickname": "muteChannel",
248                                         "responseClass": "void",
249                                         "parameters": [
250                                                 {
251                                                         "name": "channelId",
252                                                         "description": "Channel's id",
253                                                         "paramType": "path",
254                                                         "required": true,
255                                                         "allowMultiple": false,
256                                                         "dataType": "string"
257                                                 },
258                                                 {
259                                                         "name": "direction",
260                                                         "description": "Direction in which to mute audio",
261                                                         "paramType": "query",
262                                                         "required": false,
263                                                         "allowMultiple": false,
264                                                         "dataType": "string",
265                                                         "defaultValue": "both",
266                                                         "allowableValues": {
267                                                                 "valueType": "LIST",
268                                                                 "values": [
269                                                                         "both",
270                                                                         "in",
271                                                                         "out"
272                                                                 ]
273                                                         }
274                                                 }
275                                         ],
276                                         "errorResponses": [
277                                                 {
278                                                         "code": 404,
279                                                         "reason": "Channel not found"
280                                                 },
281                                                 {
282                                                         "code": 409,
283                                                         "reason": "Channel not in a Stasis application"
284                                                 }
285                                         ]
286                                 }
287                         ]
288                 },
289                 {
290                         "path": "/channels/{channelId}/unmute",
291                         "description": "Unmute a channel",
292                         "operations": [
293                                 {
294                                         "httpMethod": "POST",
295                                         "summary": "Unmute a channel.",
296                                         "nickname": "unmuteChannel",
297                                         "responseClass": "void",
298                                         "parameters": [
299                                                 {
300                                                         "name": "channelId",
301                                                         "description": "Channel's id",
302                                                         "paramType": "path",
303                                                         "required": true,
304                                                         "allowMultiple": false,
305                                                         "dataType": "string"
306                                                 },
307                                                 {
308                                                         "name": "direction",
309                                                         "description": "Direction in which to unmute audio",
310                                                         "paramType": "query",
311                                                         "required": false,
312                                                         "allowMultiple": false,
313                                                         "dataType": "string",
314                                                         "defaultValue": "both",
315                                                         "allowableValues": {
316                                                                 "valueType": "LIST",
317                                                                 "values": [
318                                                                         "both",
319                                                                         "in",
320                                                                         "out"
321                                                                 ]
322                                                         }
323                                                 }
324                                         ],
325                                         "errorResponses": [
326                                                 {
327                                                         "code": 404,
328                                                         "reason": "Channel not found"
329                                                 },
330                                                 {
331                                                         "code": 409,
332                                                         "reason": "Channel not in a Stasis application"
333                                                 }
334                                         ]
335                                 }
336                         ]
337                 },
338                 {
339                         "path": "/channels/{channelId}/hold",
340                         "description": "Put a channel on hold",
341                         "operations": [
342                                 {
343                                         "httpMethod": "POST",
344                                         "summary": "Hold a channel.",
345                                         "nickname": "holdChannel",
346                                         "responseClass": "void",
347                                         "parameters": [
348                                                 {
349                                                         "name": "channelId",
350                                                         "description": "Channel's id",
351                                                         "paramType": "path",
352                                                         "required": true,
353                                                         "allowMultiple": false,
354                                                         "dataType": "string"
355                                                 }
356                                         ],
357                                         "errorResponses": [
358                                                 {
359                                                         "code": 404,
360                                                         "reason": "Channel not found"
361                                                 },
362                                                 {
363                                                         "code": 409,
364                                                         "reason": "Channel not in a Stasis application"
365                                                 }
366                                         ]
367                                 }
368                         ]
369                 },
370                 {
371                         "path": "/channels/{channelId}/hold",
372                         "description": "Remove a channel from hold",
373                         "operations": [
374                                 {
375                                         "httpMethod": "DELETE",
376                                         "summary": "Remove a channel from hold.",
377                                         "nickname": "unholdChannel",
378                                         "responseClass": "void",
379                                         "parameters": [
380                                                 {
381                                                         "name": "channelId",
382                                                         "description": "Channel's id",
383                                                         "paramType": "path",
384                                                         "required": true,
385                                                         "allowMultiple": false,
386                                                         "dataType": "string"
387                                                 }
388                                         ],
389                                         "errorResponses": [
390                                                 {
391                                                         "code": 404,
392                                                         "reason": "Channel not found"
393                                                 },
394                                                 {
395                                                         "code": 409,
396                                                         "reason": "Channel not in a Stasis application"
397                                                 }
398                                         ]
399                                 }
400                         ]
401                 },
402                 {
403                         "path": "/channels/{channelId}/moh",
404                         "description": "Play music on hold to a channel",
405                         "operations": [
406                                 {
407                                         "httpMethod": "POST",
408                                         "summary": "Play music on hold to a channel.",
409                                         "notes": "Using media operations such as playOnChannel 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.",
410                                         "nickname": "mohStartChannel",
411                                         "responseClass": "void",
412                                         "parameters": [
413                                                 {
414                                                         "name": "channelId",
415                                                         "description": "Channel's id",
416                                                         "paramType": "path",
417                                                         "required": true,
418                                                         "allowMultiple": false,
419                                                         "dataType": "string"
420                                                 },
421                                                 {
422                                                         "name": "mohClass",
423                                                         "description": "Music on hold class to use",
424                                                         "paramType": "query",
425                                                         "required": false,
426                                                         "allowMultiple": false,
427                                                         "dataType": "string"
428                                                 }
429                                         ],
430                                         "errorResponses": [
431                                                 {
432                                                         "code": 404,
433                                                         "reason": "Channel not found"
434                                                 },
435                                                 {
436                                                         "code": 409,
437                                                         "reason": "Channel not in a Stasis application"
438                                                 }
439                                         ]
440                                 }
441                         ]
442                 },
443                 {
444                         "path": "/channels/{channelId}/moh",
445                         "description": "Stop playing music on hold to a channel",
446                         "operations": [
447                                 {
448                                         "httpMethod": "DELETE",
449                                         "summary": "Stop playing music on hold to a channel.",
450                                         "nickname": "mohStopChannel",
451                                         "responseClass": "void",
452                                         "parameters": [
453                                                 {
454                                                         "name": "channelId",
455                                                         "description": "Channel's id",
456                                                         "paramType": "path",
457                                                         "required": true,
458                                                         "allowMultiple": false,
459                                                         "dataType": "string"
460                                                 }
461                                         ],
462                                         "errorResponses": [
463                                                 {
464                                                         "code": 404,
465                                                         "reason": "Channel not found"
466                                                 },
467                                                 {
468                                                         "code": 409,
469                                                         "reason": "Channel not in a Stasis application"
470                                                 }
471                                         ]
472                                 }
473                         ]
474                 },
475                 {
476                         "path": "/channels/{channelId}/play",
477                         "description": "Play media to a channel",
478                         "operations": [
479                                 {
480                                         "httpMethod": "POST",
481                                         "summary": "Start playback of media.",
482                                         "notes": "The media URI may be any of a number of URI's. Currently sound: and recording: 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.)",
483                                         "nickname": "playOnChannel",
484                                         "responseClass": "Playback",
485                                         "parameters": [
486                                                 {
487                                                         "name": "channelId",
488                                                         "description": "Channel's id",
489                                                         "paramType": "path",
490                                                         "required": true,
491                                                         "allowMultiple": false,
492                                                         "dataType": "string"
493                                                 },
494                                                 {
495                                                         "name": "media",
496                                                         "description": "Media's URI to play.",
497                                                         "paramType": "query",
498                                                         "required": true,
499                                                         "allowMultiple": false,
500                                                         "dataType": "string"
501                                                 },
502                                                 {
503                                                         "name": "lang",
504                                                         "description": "For sounds, selects language for sound.",
505                                                         "paramType": "query",
506                                                         "required": false,
507                                                         "allowMultiple": false,
508                                                         "dataType": "string"
509                                                 },
510                                                 {
511                                                         "name": "offsetms",
512                                                         "description": "Number of media to skip before playing.",
513                                                         "paramType": "query",
514                                                         "required": false,
515                                                         "allowMultiple": false,
516                                                         "dataType": "int"
517                                                 },
518                                                 {
519                                                         "name": "skipms",
520                                                         "description": "Number of milliseconds to skip for forward/reverse operations.",
521                                                         "paramType": "query",
522                                                         "required": false,
523                                                         "allowMultiple": false,
524                                                         "dataType": "int",
525                                                         "defaultValue": 3000
526                                                 }
527                                         ],
528                                         "errorResponses": [
529                                                 {
530                                                         "code": 404,
531                                                         "reason": "Channel not found"
532                                                 },
533                                                 {
534                                                         "code": 409,
535                                                         "reason": "Channel not in a Stasis application"
536                                                 }
537                                         ]
538                                 }
539                         ]
540                 },
541                 {
542                         "path": "/channels/{channelId}/record",
543                         "description": "Record audio from a channel",
544                         "operations": [
545                                 {
546                                         "httpMethod": "POST",
547                                         "summary": "Start a recording.",
548                                         "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.",
549                                         "nickname": "recordChannel",
550                                         "responseClass": "LiveRecording",
551                                         "parameters": [
552                                                 {
553                                                         "name": "channelId",
554                                                         "description": "Channel's id",
555                                                         "paramType": "path",
556                                                         "required": true,
557                                                         "allowMultiple": false,
558                                                         "dataType": "string"
559                                                 },
560                                                 {
561                                                         "name": "name",
562                                                         "description": "Recording's filename",
563                                                         "paramType": "query",
564                                                         "required": true,
565                                                         "allowMultiple": false,
566                                                         "dataType": "string"
567                                                 },
568                                                 {
569                                                         "name": "format",
570                                                         "description": "Format to encode audio in",
571                                                         "paramType": "query",
572                                                         "required": true,
573                                                         "allowMultiple": false,
574                                                         "dataType": "string"
575                                                 },
576                                                 {
577                                                         "name": "maxDurationSeconds",
578                                                         "description": "Maximum duration of the recording, in seconds. 0 for no limit",
579                                                         "paramType": "query",
580                                                         "required": false,
581                                                         "allowMultiple": false,
582                                                         "dataType": "int",
583                                                         "defaultValue": 0,
584                                                         "allowableValues": {
585                                                                 "valueType": "RANGE",
586                                                                 "min": 0
587                                                         }
588                                                 },
589                                                 {
590                                                         "name": "maxSilenceSeconds",
591                                                         "description": "Maximum duration of silence, in seconds. 0 for no limit",
592                                                         "paramType": "query",
593                                                         "required": false,
594                                                         "allowMultiple": false,
595                                                         "dataType": "int",
596                                                         "defaultValue": 0,
597                                                         "allowableValues": {
598                                                                 "valueType": "RANGE",
599                                                                 "min": 0
600                                                         }
601                                                 },
602                                                 {
603                                                         "name": "ifExists",
604                                                         "description": "Action to take if a recording with the same name already exists.",
605                                                         "paramType": "query",
606                                                         "required": false,
607                                                         "allowMultiple": false,
608                                                         "dataType": "string",
609                                                         "defaultValue": "fail",
610                                                         "allowableValues": {
611                                                                 "valueType": "LIST",
612                                                                 "values": [
613                                                                         "fail",
614                                                                         "overwrite",
615                                                                         "append"
616                                                                 ]
617                                                         }
618                                                 },
619                                                 {
620                                                         "name": "beep",
621                                                         "description": "Play beep when recording begins",
622                                                         "paramType": "query",
623                                                         "required": false,
624                                                         "allowMultiple": false,
625                                                         "dataType": "boolean",
626                                                         "defaultValue": false
627                                                 },
628                                                 {
629                                                         "name": "terminateOn",
630                                                         "description": "DTMF input to terminate recording",
631                                                         "paramType": "query",
632                                                         "required": false,
633                                                         "allowMultiple": false,
634                                                         "dataType": "string",
635                                                         "defaultValue": "none",
636                                                         "allowableValues": {
637                                                                 "valueType": "LIST",
638                                                                 "values": [
639                                                                         "none",
640                                                                         "any",
641                                                                         "*",
642                                                                         "#"
643                                                                 ]
644                                                         }
645                                                 }
646                                         ],
647                                         "errorResponses": [
648                                                 {
649                                                         "code": 400,
650                                                         "reason": "Invalid parameters"
651                                                 },
652                                                 {
653                                                         "code": 404,
654                                                         "reason": "Channel not found"
655                                                 },
656                                                 {
657                                                         "code": 409,
658                                                         "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"
659                                                 },
660                                                 {
661                                                         "code": 422,
662                                                         "reason": "The format specified is unknown on this system"
663                                                 }
664                                         ]
665                                 }
666                         ]
667                 },
668                 {
669                         "path": "/channels/{channelId}/variable",
670                         "description": "Variables on a channel",
671                         "operations": [
672                                 {
673                                         "httpMethod": "GET",
674                                         "summary": "Get the value of a channel variable or function.",
675                                         "nickname": "getChannelVar",
676                                         "responseClass": "Variable",
677                                         "parameters": [
678                                                 {
679                                                         "name": "channelId",
680                                                         "description": "Channel's id",
681                                                         "paramType": "path",
682                                                         "required": true,
683                                                         "allowMultiple": false,
684                                                         "dataType": "string"
685                                                 },
686                                                 {
687                                                         "name": "variable",
688                                                         "description": "The channel variable or function to get",
689                                                         "paramType": "query",
690                                                         "required": true,
691                                                         "allowMultiple": false,
692                                                         "dataType": "string"
693                                                 }
694                                         ],
695                                         "errorResponses": [
696                                                 {
697                                                         "code": 400,
698                                                         "reason": "Missing variable parameter."
699                                                 },
700                                                 {
701                                                         "code": 404,
702                                                         "reason": "Channel not found"
703                                                 },
704                                                 {
705                                                         "code": 409,
706                                                         "reason": "Channel not in a Stasis application"
707                                                 }
708                                         ]
709                                 },
710                                 {
711                                         "httpMethod": "POST",
712                                         "summary": "Set the value of a channel variable or function.",
713                                         "nickname": "setChannelVar",
714                                         "responseClass": "void",
715                                         "parameters": [
716                                                 {
717                                                         "name": "channelId",
718                                                         "description": "Channel's id",
719                                                         "paramType": "path",
720                                                         "required": true,
721                                                         "allowMultiple": false,
722                                                         "dataType": "string"
723                                                 },
724                                                 {
725                                                         "name": "variable",
726                                                         "description": "The channel variable or function to set",
727                                                         "paramType": "query",
728                                                         "required": true,
729                                                         "allowMultiple": false,
730                                                         "dataType": "string"
731                                                 },
732                                                 {
733                                                         "name": "value",
734                                                         "description": "The value to set the variable to",
735                                                         "paramType": "query",
736                                                         "required": false,
737                                                         "allowMultiple": false,
738                                                         "dataType": "string"
739                                                 }
740                                         ],
741                                         "errorResponses": [
742                                                 {
743                                                         "code": 400,
744                                                         "reason": "Missing variable parameter."
745                                                 },
746                                                 {
747                                                         "code": 404,
748                                                         "reason": "Channel not found"
749                                                 },
750                                                 {
751                                                         "code": 409,
752                                                         "reason": "Channel not in a Stasis application"
753                                                 }
754                                         ]
755                                 }
756                         ]
757                 }
758         ],
759         "models": {
760                 "Dialed": {
761                         "id": "Dialed",
762                         "description": "Dialed channel information.",
763                         "properties": {}
764                 },
765                 "DialplanCEP": {
766                         "id": "DialplanCEP",
767                         "description": "Dialplan location (context/extension/priority)",
768                         "properties": {
769                                 "context": {
770                                         "required": true,
771                                         "type": "string",
772                                         "description": "Context in the dialplan"
773                                 },
774                                 "exten": {
775                                         "required": true,
776                                         "type": "string",
777                                         "description": "Extension in the dialplan"
778                                 },
779                                 "priority": {
780                                         "required": true,
781                                         "type": "long",
782                                         "description": "Priority in the dialplan"
783                                 }
784                         }
785                 },
786                 "CallerID": {
787                         "id": "CallerID",
788                         "description": "Caller identification",
789                         "properties": {
790                                 "name": {
791                                         "required": true,
792                                         "type": "string"
793                                 },
794                                 "number": {
795                                         "required": true,
796                                         "type": "string"
797                                 }
798                         }
799                 },
800                 "Channel": {
801                         "id": "Channel",
802                         "description": "A specific communication connection between Asterisk and an Endpoint.",
803                         "properties": {
804                                 "id": {
805                                         "required": true,
806                                         "type": "string",
807                                         "description": "Unique identifier of the channel.\n\nThis is the same as the Uniqueid field in AMI."
808                                 },
809                                 "name": {
810                                         "required": true,
811                                         "type": "string",
812                                         "description": "Name of the channel (i.e. SIP/foo-0000a7e3)"
813                                 },
814                                 "state": {
815                                         "required": true,
816                                         "type": "string",
817                                         "allowableValues": {
818                                                 "valueType": "LIST",
819                                                 "values": [
820                                                         "Down",
821                                                         "Rsrved",
822                                                         "OffHook",
823                                                         "Dialing",
824                                                         "Ring",
825                                                         "Ringing",
826                                                         "Up",
827                                                         "Busy",
828                                                         "Dialing Offhook",
829                                                         "Pre-ring",
830                                                         "Unknown"
831                                                 ]
832                                         }
833                                 },
834                                 "caller": {
835                                         "required": true,
836                                         "type": "CallerID"
837                                 },
838                                 "connected": {
839                                         "required": true,
840                                         "type": "CallerID"
841                                 },
842                                 "accountcode": {
843                                         "required": true,
844                                         "type": "string"
845                                 },
846                                 "dialplan": {
847                                         "required": true,
848                                         "type": "DialplanCEP",
849                                         "description": "Current location in the dialplan"
850                                 },
851                                 "creationtime": {
852                                         "required": true,
853                                         "type": "Date",
854                                         "description": "Timestamp when channel was created"
855                                 }
856                         }
857                 }
858         }
859 }