| 1 | { |
| 2 | "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.", |
| 3 | "_author": "David M. Lee, II <[email protected]>", |
| 4 | "_svn_revision": "$Revision$", |
| 5 | "apiVersion": "2.0.0", |
| 6 | "swaggerVersion": "1.2", |
| 7 | "basePath": "http://localhost:8088/ari", |
| 8 | "resourcePath": "/api-docs/events.{format}", |
| 9 | "since": [ |
| 10 | "12.0.0" |
| 11 | ], |
| 12 | "requiresModules": [ |
| 13 | "res_http_websocket" |
| 14 | ], |
| 15 | "apis": [ |
| 16 | { |
| 17 | "path": "/events", |
| 18 | "description": "Events from Asterisk to applications", |
| 19 | "operations": [ |
| 20 | { |
| 21 | "httpMethod": "GET", |
| 22 | "since": [ |
| 23 | "12.0.0" |
| 24 | ], |
| 25 | "upgrade": "websocket", |
| 26 | "websocketProtocol": "ari", |
| 27 | "summary": "WebSocket connection for events.", |
| 28 | "nickname": "eventWebsocket", |
| 29 | "responseClass": "Message", |
| 30 | "parameters": [ |
| 31 | { |
| 32 | "name": "app", |
| 33 | "description": "Applications to subscribe to.", |
| 34 | "paramType": "query", |
| 35 | "required": true, |
| 36 | "allowMultiple": true, |
| 37 | "dataType": "string" |
| 38 | }, |
| 39 | { |
| 40 | "name": "subscribeAll", |
| 41 | "description": "Subscribe to all Asterisk events. If provided, the applications listed will be subscribed to all events, effectively disabling the application specific subscriptions. Default is 'false'.", |
| 42 | "paramType": "query", |
| 43 | "required": false, |
| 44 | "allowMultiple": false, |
| 45 | "dataType": "boolean" |
| 46 | } |
| 47 | ] |
| 48 | } |
| 49 | ] |
| 50 | }, |
| 51 | { |
| 52 | "path": "/events/user/{eventName}", |
| 53 | "description": "Stasis application user events", |
| 54 | "operations": [ |
| 55 | { |
| 56 | "httpMethod": "POST", |
| 57 | "since": [ |
| 58 | "12.3.0" |
| 59 | ], |
| 60 | "summary": "Generate a user event.", |
| 61 | "nickname": "userEvent", |
| 62 | "responseClass": "void", |
| 63 | "parameters": [ |
| 64 | { |
| 65 | "name": "eventName", |
| 66 | "description": "Event name", |
| 67 | "paramType": "path", |
| 68 | "required": true, |
| 69 | "allowMultiple": false, |
| 70 | "dataType": "string" |
| 71 | }, |
| 72 | { |
| 73 | "name": "application", |
| 74 | "description": "The name of the application that will receive this event", |
| 75 | "paramType": "query", |
| 76 | "required": true, |
| 77 | "allowMultiple": false, |
| 78 | "dataType": "string" |
| 79 | }, |
| 80 | { |
| 81 | "name": "source", |
| 82 | "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}", |
| 83 | "paramType": "query", |
| 84 | "required": false, |
| 85 | "allowMultiple": true, |
| 86 | "dataType": "string" |
| 87 | }, |
| 88 | { |
| 89 | "name": "variables", |
| 90 | "description": "The \"variables\" key in the body object holds custom key/value pairs to add to the user event. Ex. { \"variables\": { \"key\": \"value\" } }", |
| 91 | "paramType": "body", |
| 92 | "required": false, |
| 93 | "allowMultiple": false, |
| 94 | "dataType": "containers" |
| 95 | } |
| 96 | ], |
| 97 | "errorResponses": [ |
| 98 | { |
| 99 | "code": 404, |
| 100 | "reason": "Application does not exist." |
| 101 | }, |
| 102 | { |
| 103 | "code": 422, |
| 104 | "reason": "Event source not found." |
| 105 | }, |
| 106 | { |
| 107 | "code": 400, |
| 108 | "reason": "Invalid even tsource URI or userevent data." |
| 109 | } |
| 110 | ] |
| 111 | } |
| 112 | ] |
| 113 | }, |
| 114 | { |
| 115 | "path": "/events/claim", |
| 116 | "description": "Broadcast channel claim operations", |
| 117 | "operations": [ |
| 118 | { |
| 119 | "httpMethod": "POST", |
| 120 | "since": [ |
| 121 | "20.17.0", |
| 122 | "22.7.0", |
| 123 | "23.1.0" |
| 124 | ], |
| 125 | "summary": "Claim a broadcast channel for this application.", |
| 126 | "notes": "Atomically claims a channel that is in broadcast state. Only the first claim succeeds.", |
| 127 | "nickname": "claimChannel", |
| 128 | "responseClass": "void", |
| 129 | "parameters": [ |
| 130 | { |
| 131 | "name": "channelId", |
| 132 | "description": "The ID of the channel to claim", |
| 133 | "paramType": "query", |
| 134 | "required": true, |
| 135 | "allowMultiple": false, |
| 136 | "dataType": "string" |
| 137 | }, |
| 138 | { |
| 139 | "name": "application", |
| 140 | "description": "The name of the application claiming the channel", |
| 141 | "paramType": "query", |
| 142 | "required": true, |
| 143 | "allowMultiple": false, |
| 144 | "dataType": "string" |
| 145 | } |
| 146 | ], |
| 147 | "errorResponses": [ |
| 148 | { |
| 149 | "code": 404, |
| 150 | "reason": "Channel not found or not in broadcast state." |
| 151 | }, |
| 152 | { |
| 153 | "code": 409, |
| 154 | "reason": "Channel has already been claimed by another application." |
| 155 | } |
| 156 | ] |
| 157 | } |
| 158 | ] |
| 159 | } |
| 160 | ], |
| 161 | "models": { |
| 162 | "Message": { |
| 163 | "id": "Message", |
| 164 | "description": "Base type for errors and events", |
| 165 | "discriminator": "type", |
| 166 | "properties": { |
| 167 | "type": { |
| 168 | "type": "string", |
| 169 | "required": true, |
| 170 | "description": "Indicates the type of this message." |
| 171 | }, |
| 172 | "asterisk_id": { |
| 173 | "type": "string", |
| 174 | "required": false, |
| 175 | "description": "The unique ID for the Asterisk instance that raised this event." |
| 176 | } |
| 177 | }, |
| 178 | "subTypes": [ |
| 179 | "MissingParams", |
| 180 | "Event" |
| 181 | ] |
| 182 | }, |
| 183 | "MissingParams": { |
| 184 | "id": "MissingParams", |
| 185 | "description": "Error event sent when required params are missing.", |
| 186 | "properties": { |
| 187 | "params": { |
| 188 | "required": true, |
| 189 | "type": "List[string]", |
| 190 | "description": "A list of the missing parameters" |
| 191 | } |
| 192 | } |
| 193 | }, |
| 194 | "Event": { |
| 195 | "id": "Event", |
| 196 | "description": "Base type for asynchronous events from Asterisk.", |
| 197 | "properties": { |
| 198 | "application": { |
| 199 | "type": "string", |
| 200 | "description": "Name of the application receiving the event.", |
| 201 | "required": true |
| 202 | }, |
| 203 | "timestamp": { |
| 204 | "type": "Date", |
| 205 | "description": "Time at which this event was created.", |
| 206 | "required": true |
| 207 | } |
| 208 | }, |
| 209 | "subTypes": [ |
| 210 | "DeviceStateChanged", |
| 211 | "PlaybackStarted", |
| 212 | "PlaybackContinuing", |
| 213 | "PlaybackFinished", |
| 214 | "RecordingStarted", |
| 215 | "RecordingFinished", |
| 216 | "RecordingFailed", |
| 217 | "ApplicationMoveFailed", |
| 218 | "ApplicationRegistered", |
| 219 | "ApplicationUnregistered", |
| 220 | "ApplicationReplaced", |
| 221 | "BridgeCreated", |
| 222 | "BridgeDestroyed", |
| 223 | "BridgeMerged", |
| 224 | "BridgeBlindTransfer", |
| 225 | "BridgeAttendedTransfer", |
| 226 | "BridgeVideoSourceChanged", |
| 227 | "ChannelCreated", |
| 228 | "ChannelDestroyed", |
| 229 | "ChannelEnteredBridge", |
| 230 | "ChannelLeftBridge", |
| 231 | "ChannelStateChange", |
| 232 | "ChannelDtmfReceived", |
| 233 | "ChannelDialplan", |
| 234 | "ChannelCallerId", |
| 235 | "ChannelUserevent", |
| 236 | "ChannelHangupRequest", |
| 237 | "ChannelVarset", |
| 238 | "ChannelToneDetected", |
| 239 | "ChannelTalkingStarted", |
| 240 | "ChannelTalkingFinished", |
| 241 | "ChannelHold", |
| 242 | "ChannelUnhold", |
| 243 | "ContactStatusChange", |
| 244 | "EndpointStateChange", |
| 245 | "Dial", |
| 246 | "StasisEnd", |
| 247 | "StasisStart", |
| 248 | "TextMessageReceived", |
| 249 | "ChannelConnectedLine", |
| 250 | "PeerStatusChange", |
| 251 | "ChannelTransfer", |
| 252 | "RESTResponse", |
| 253 | "CallBroadcast", |
| 254 | "CallClaimed" |
| 255 | ] |
| 256 | }, |
| 257 | "ContactInfo": { |
| 258 | "id": "ContactInfo", |
| 259 | "description": "Detailed information about a contact on an endpoint.", |
| 260 | "properties": { |
| 261 | "uri": { |
| 262 | "type": "string", |
| 263 | "description": "The location of the contact.", |
| 264 | "required": true |
| 265 | }, |
| 266 | "contact_status": { |
| 267 | "type": "string", |
| 268 | "description": "The current status of the contact.", |
| 269 | "required": true, |
| 270 | "allowableValues": { |
| 271 | "valueType": "LIST", |
| 272 | "values": [ |
| 273 | "Unreachable", |
| 274 | "Reachable", |
| 275 | "Unknown", |
| 276 | "NonQualified", |
| 277 | "Removed" |
| 278 | ] |
| 279 | } |
| 280 | }, |
| 281 | "aor": { |
| 282 | "type": "string", |
| 283 | "description": "The Address of Record this contact belongs to.", |
| 284 | "required": true |
| 285 | }, |
| 286 | "roundtrip_usec": { |
| 287 | "type": "string", |
| 288 | "description": "Current round trip time, in microseconds, for the contact.", |
| 289 | "required": false |
| 290 | } |
| 291 | } |
| 292 | }, |
| 293 | "Peer": { |
| 294 | "id": "Peer", |
| 295 | "description": "Detailed information about a remote peer that communicates with Asterisk.", |
| 296 | "properties": { |
| 297 | "peer_status": { |
| 298 | "type": "string", |
| 299 | "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.", |
| 300 | "required": true |
| 301 | }, |
| 302 | "cause": { |
| 303 | "type": "string", |
| 304 | "description": "An optional reason associated with the change in peer_status.", |
| 305 | "required": false |
| 306 | }, |
| 307 | "address": { |
| 308 | "type": "string", |
| 309 | "description": "The IP address of the peer.", |
| 310 | "required": false |
| 311 | }, |
| 312 | "port": { |
| 313 | "type": "string", |
| 314 | "description": "The port of the peer.", |
| 315 | "required": false |
| 316 | }, |
| 317 | "time": { |
| 318 | "type": "string", |
| 319 | "description": "The last known time the peer was contacted.", |
| 320 | "required": false |
| 321 | } |
| 322 | } |
| 323 | }, |
| 324 | "DeviceStateChanged": { |
| 325 | "id": "DeviceStateChanged", |
| 326 | "description": "Notification that a device state has changed.", |
| 327 | "properties": { |
| 328 | "device_state": { |
| 329 | "type": "DeviceState", |
| 330 | "description": "Device state object", |
| 331 | "required": true |
| 332 | } |
| 333 | } |
| 334 | }, |
| 335 | "PlaybackStarted": { |
| 336 | "id": "PlaybackStarted", |
| 337 | "description": "Event showing the start of a media playback operation.", |
| 338 | "properties": { |
| 339 | "playback": { |
| 340 | "type": "Playback", |
| 341 | "description": "Playback control object", |
| 342 | "required": true |
| 343 | } |
| 344 | } |
| 345 | }, |
| 346 | "PlaybackContinuing": { |
| 347 | "id": "PlaybackContinuing", |
| 348 | "description": "Event showing the continuation of a media playback operation from one media URI to the next in the list.", |
| 349 | "properties": { |
| 350 | "playback": { |
| 351 | "type": "Playback", |
| 352 | "description": "Playback control object", |
| 353 | "required": true |
| 354 | } |
| 355 | } |
| 356 | }, |
| 357 | "PlaybackFinished": { |
| 358 | "id": "PlaybackFinished", |
| 359 | "description": "Event showing the completion of a media playback operation.", |
| 360 | "properties": { |
| 361 | "playback": { |
| 362 | "type": "Playback", |
| 363 | "description": "Playback control object", |
| 364 | "required": true |
| 365 | } |
| 366 | } |
| 367 | }, |
| 368 | "RecordingStarted": { |
| 369 | "id": "RecordingStarted", |
| 370 | "description": "Event showing the start of a recording operation.", |
| 371 | "properties": { |
| 372 | "recording": { |
| 373 | "type": "LiveRecording", |
| 374 | "description": "Recording control object", |
| 375 | "required": true |
| 376 | } |
| 377 | } |
| 378 | }, |
| 379 | "RecordingFinished": { |
| 380 | "id": "RecordingFinished", |
| 381 | "description": "Event showing the completion of a recording operation.", |
| 382 | "properties": { |
| 383 | "recording": { |
| 384 | "type": "LiveRecording", |
| 385 | "description": "Recording control object", |
| 386 | "required": true |
| 387 | } |
| 388 | } |
| 389 | }, |
| 390 | "RecordingFailed": { |
| 391 | "id": "RecordingFailed", |
| 392 | "description": "Event showing failure of a recording operation.", |
| 393 | "properties": { |
| 394 | "recording": { |
| 395 | "type": "LiveRecording", |
| 396 | "description": "Recording control object", |
| 397 | "required": true |
| 398 | } |
| 399 | } |
| 400 | }, |
| 401 | "ApplicationMoveFailed": { |
| 402 | "id": "ApplicationMoveFailed", |
| 403 | "description": "Notification that trying to move a channel to another Stasis application failed.", |
| 404 | "properties": { |
| 405 | "channel": { |
| 406 | "required": true, |
| 407 | "type": "Channel" |
| 408 | }, |
| 409 | "destination": { |
| 410 | "required": true, |
| 411 | "type": "string" |
| 412 | }, |
| 413 | "args": { |
| 414 | "required": true, |
| 415 | "type": "List[string]", |
| 416 | "description": "Arguments to the application" |
| 417 | } |
| 418 | } |
| 419 | }, |
| 420 | "ApplicationRegistered": { |
| 421 | "id": "ApplicationRegistered", |
| 422 | "description": "Notification that a Stasis app has been registered.", |
| 423 | "properties": {} |
| 424 | }, |
| 425 | "ApplicationUnregistered": { |
| 426 | "id": "ApplicationUnregistered", |
| 427 | "description": "Notification that a Stasis app has been unregistered.", |
| 428 | "properties": {} |
| 429 | }, |
| 430 | "ApplicationReplaced": { |
| 431 | "id": "ApplicationReplaced", |
| 432 | "description": "Notification that another WebSocket has taken over for an application.\n\nAn application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.", |
| 433 | "properties": {} |
| 434 | }, |
| 435 | "BridgeCreated": { |
| 436 | "id": "BridgeCreated", |
| 437 | "description": "Notification that a bridge has been created.", |
| 438 | "properties": { |
| 439 | "bridge": { |
| 440 | "required": true, |
| 441 | "type": "Bridge" |
| 442 | } |
| 443 | } |
| 444 | }, |
| 445 | "BridgeDestroyed": { |
| 446 | "id": "BridgeDestroyed", |
| 447 | "description": "Notification that a bridge has been destroyed.", |
| 448 | "properties": { |
| 449 | "bridge": { |
| 450 | "required": true, |
| 451 | "type": "Bridge" |
| 452 | } |
| 453 | } |
| 454 | }, |
| 455 | "BridgeMerged": { |
| 456 | "id": "BridgeMerged", |
| 457 | "description": "Notification that one bridge has merged into another.", |
| 458 | "properties": { |
| 459 | "bridge": { |
| 460 | "required": true, |
| 461 | "type": "Bridge" |
| 462 | }, |
| 463 | "bridge_from": { |
| 464 | "required": true, |
| 465 | "type": "Bridge" |
| 466 | } |
| 467 | } |
| 468 | }, |
| 469 | "BridgeVideoSourceChanged": { |
| 470 | "id": "BridgeVideoSourceChanged", |
| 471 | "description": "Notification that the source of video in a bridge has changed.", |
| 472 | "properties": { |
| 473 | "bridge": { |
| 474 | "required": true, |
| 475 | "type": "Bridge" |
| 476 | }, |
| 477 | "old_video_source_id": { |
| 478 | "required": false, |
| 479 | "type": "string" |
| 480 | } |
| 481 | } |
| 482 | }, |
| 483 | "BridgeBlindTransfer": { |
| 484 | "id": "BridgeBlindTransfer", |
| 485 | "description": "Notification that a blind transfer has occurred.", |
| 486 | "properties": { |
| 487 | "channel": { |
| 488 | "description": "The channel performing the blind transfer", |
| 489 | "required": true, |
| 490 | "type": "Channel" |
| 491 | }, |
| 492 | "replace_channel": { |
| 493 | "description": "The channel that is replacing transferer when the transferee(s) can not be transferred directly", |
| 494 | "required": false, |
| 495 | "type": "Channel" |
| 496 | }, |
| 497 | "transferee": { |
| 498 | "description": "The channel that is being transferred", |
| 499 | "required": false, |
| 500 | "type": "Channel" |
| 501 | }, |
| 502 | "exten": { |
| 503 | "description": "The extension transferred to", |
| 504 | "required": true, |
| 505 | "type": "string" |
| 506 | }, |
| 507 | "context": { |
| 508 | "description": "The context transferred to", |
| 509 | "required": true, |
| 510 | "type": "string" |
| 511 | }, |
| 512 | "result": { |
| 513 | "description": "The result of the transfer attempt", |
| 514 | "required": true, |
| 515 | "type": "string" |
| 516 | }, |
| 517 | "is_external": { |
| 518 | "description": "Whether the transfer was externally initiated or not", |
| 519 | "required": true, |
| 520 | "type": "boolean" |
| 521 | }, |
| 522 | "bridge": { |
| 523 | "description": "The bridge being transferred", |
| 524 | "type": "Bridge" |
| 525 | } |
| 526 | } |
| 527 | }, |
| 528 | "BridgeAttendedTransfer": { |
| 529 | "id": "BridgeAttendedTransfer", |
| 530 | "description": "Notification that an attended transfer has occurred.", |
| 531 | "properties": { |
| 532 | "transferer_first_leg": { |
| 533 | "description": "First leg of the transferer", |
| 534 | "required": true, |
| 535 | "type": "Channel" |
| 536 | }, |
| 537 | "transferer_second_leg": { |
| 538 | "description": "Second leg of the transferer", |
| 539 | "required": true, |
| 540 | "type": "Channel" |
| 541 | }, |
| 542 | "replace_channel": { |
| 543 | "description": "The channel that is replacing transferer_first_leg in the swap", |
| 544 | "required": false, |
| 545 | "type": "Channel" |
| 546 | }, |
| 547 | "transferee": { |
| 548 | "description": "The channel that is being transferred", |
| 549 | "required": false, |
| 550 | "type": "Channel" |
| 551 | }, |
| 552 | "transfer_target": { |
| 553 | "description": "The channel that is being transferred to", |
| 554 | "required": false, |
| 555 | "type": "Channel" |
| 556 | }, |
| 557 | "result": { |
| 558 | "description": "The result of the transfer attempt", |
| 559 | "required": true, |
| 560 | "type": "string" |
| 561 | }, |
| 562 | "is_external": { |
| 563 | "description": "Whether the transfer was externally initiated or not", |
| 564 | "required": true, |
| 565 | "type": "boolean" |
| 566 | }, |
| 567 | "transferer_first_leg_bridge": { |
| 568 | "description": "Bridge the transferer first leg is in", |
| 569 | "type": "Bridge" |
| 570 | }, |
| 571 | "transferer_second_leg_bridge": { |
| 572 | "description": "Bridge the transferer second leg is in", |
| 573 | "type": "Bridge" |
| 574 | }, |
| 575 | "destination_type": { |
| 576 | "description": "How the transfer was accomplished", |
| 577 | "required": true, |
| 578 | "type": "string" |
| 579 | }, |
| 580 | "destination_bridge": { |
| 581 | "description": "Bridge that survived the merge result", |
| 582 | "type": "string" |
| 583 | }, |
| 584 | "destination_application": { |
| 585 | "description": "Application that has been transferred into", |
| 586 | "type": "string" |
| 587 | }, |
| 588 | "destination_link_first_leg": { |
| 589 | "description": "First leg of a link transfer result", |
| 590 | "type": "Channel" |
| 591 | }, |
| 592 | "destination_link_second_leg": { |
| 593 | "description": "Second leg of a link transfer result", |
| 594 | "type": "Channel" |
| 595 | }, |
| 596 | "destination_threeway_channel": { |
| 597 | "description": "Transferer channel that survived the threeway result", |
| 598 | "type": "Channel" |
| 599 | }, |
| 600 | "destination_threeway_bridge": { |
| 601 | "description": "Bridge that survived the threeway result", |
| 602 | "type": "Bridge" |
| 603 | } |
| 604 | } |
| 605 | }, |
| 606 | "ChannelCreated": { |
| 607 | "id": "ChannelCreated", |
| 608 | "description": "Notification that a channel has been created.", |
| 609 | "properties": { |
| 610 | "channel": { |
| 611 | "required": true, |
| 612 | "type": "Channel" |
| 613 | } |
| 614 | } |
| 615 | }, |
| 616 | "ChannelDestroyed": { |
| 617 | "id": "ChannelDestroyed", |
| 618 | "description": "Notification that a channel has been destroyed.", |
| 619 | "properties": { |
| 620 | "cause": { |
| 621 | "required": true, |
| 622 | "description": "Integer representation of the cause of the hangup", |
| 623 | "type": "int" |
| 624 | }, |
| 625 | "cause_txt": { |
| 626 | "required": true, |
| 627 | "description": "Text representation of the cause of the hangup", |
| 628 | "type": "string" |
| 629 | }, |
| 630 | "tech_cause": { |
| 631 | "type": "int", |
| 632 | "description": "Integer representation of the technology-specific off-nominal cause of the hangup." |
| 633 | }, |
| 634 | "channel": { |
| 635 | "required": true, |
| 636 | "type": "Channel" |
| 637 | } |
| 638 | } |
| 639 | }, |
| 640 | "ChannelEnteredBridge": { |
| 641 | "id": "ChannelEnteredBridge", |
| 642 | "description": "Notification that a channel has entered a bridge.", |
| 643 | "properties": { |
| 644 | "bridge": { |
| 645 | "required": true, |
| 646 | "type": "Bridge" |
| 647 | }, |
| 648 | "channel": { |
| 649 | "type": "Channel" |
| 650 | } |
| 651 | } |
| 652 | }, |
| 653 | "ChannelLeftBridge": { |
| 654 | "id": "ChannelLeftBridge", |
| 655 | "description": "Notification that a channel has left a bridge.", |
| 656 | "properties": { |
| 657 | "bridge": { |
| 658 | "required": true, |
| 659 | "type": "Bridge" |
| 660 | }, |
| 661 | "channel": { |
| 662 | "required": true, |
| 663 | "type": "Channel" |
| 664 | } |
| 665 | } |
| 666 | }, |
| 667 | "ChannelStateChange": { |
| 668 | "id": "ChannelStateChange", |
| 669 | "description": "Notification of a channel's state change.", |
| 670 | "properties": { |
| 671 | "channel": { |
| 672 | "required": true, |
| 673 | "type": "Channel" |
| 674 | } |
| 675 | } |
| 676 | }, |
| 677 | "ChannelDtmfReceived": { |
| 678 | "id": "ChannelDtmfReceived", |
| 679 | "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF", |
| 680 | "properties": { |
| 681 | "digit": { |
| 682 | "required": true, |
| 683 | "type": "string", |
| 684 | "description": "DTMF digit received (0-9, A-E, # or *)" |
| 685 | }, |
| 686 | "duration_ms": { |
| 687 | "required": true, |
| 688 | "type": "int", |
| 689 | "description": "Number of milliseconds DTMF was received" |
| 690 | }, |
| 691 | "channel": { |
| 692 | "required": true, |
| 693 | "type": "Channel", |
| 694 | "description": "The channel on which DTMF was received" |
| 695 | } |
| 696 | } |
| 697 | }, |
| 698 | "ChannelDialplan": { |
| 699 | "id": "ChannelDialplan", |
| 700 | "description": "Channel changed location in the dialplan.", |
| 701 | "properties": { |
| 702 | "channel": { |
| 703 | "required": true, |
| 704 | "type": "Channel", |
| 705 | "description": "The channel that changed dialplan location." |
| 706 | }, |
| 707 | "dialplan_app": { |
| 708 | "required": true, |
| 709 | "type": "string", |
| 710 | "description": "The application about to be executed." |
| 711 | }, |
| 712 | "dialplan_app_data": { |
| 713 | "required": true, |
| 714 | "type": "string", |
| 715 | "description": "The data to be passed to the application." |
| 716 | } |
| 717 | } |
| 718 | }, |
| 719 | "ChannelCallerId": { |
| 720 | "id": "ChannelCallerId", |
| 721 | "description": "Channel changed Caller ID.", |
| 722 | "properties": { |
| 723 | "caller_presentation": { |
| 724 | "required": true, |
| 725 | "type": "int", |
| 726 | "description": "The integer representation of the Caller Presentation value." |
| 727 | }, |
| 728 | "caller_presentation_txt": { |
| 729 | "required": true, |
| 730 | "type": "string", |
| 731 | "description": "The text representation of the Caller Presentation value." |
| 732 | }, |
| 733 | "channel": { |
| 734 | "required": true, |
| 735 | "type": "Channel", |
| 736 | "description": "The channel that changed Caller ID." |
| 737 | } |
| 738 | } |
| 739 | }, |
| 740 | "ChannelUserevent": { |
| 741 | "id": "ChannelUserevent", |
| 742 | "description": "User-generated event with additional user-defined fields in the object.", |
| 743 | "properties": { |
| 744 | "eventname": { |
| 745 | "required": true, |
| 746 | "type": "string", |
| 747 | "description": "The name of the user event." |
| 748 | }, |
| 749 | "channel": { |
| 750 | "required": false, |
| 751 | "type": "Channel", |
| 752 | "description": "A channel that is signaled with the user event." |
| 753 | }, |
| 754 | "bridge": { |
| 755 | "required": false, |
| 756 | "type": "Bridge", |
| 757 | "description": "A bridge that is signaled with the user event." |
| 758 | }, |
| 759 | "endpoint": { |
| 760 | "required": false, |
| 761 | "type": "Endpoint", |
| 762 | "description": "A endpoint that is signaled with the user event." |
| 763 | }, |
| 764 | "userevent": { |
| 765 | "required": true, |
| 766 | "type": "object", |
| 767 | "description": "Custom Userevent data" |
| 768 | } |
| 769 | } |
| 770 | }, |
| 771 | "ChannelHangupRequest": { |
| 772 | "id": "ChannelHangupRequest", |
| 773 | "description": "A hangup was requested on the channel.", |
| 774 | "properties": { |
| 775 | "cause": { |
| 776 | "type": "int", |
| 777 | "description": "Integer representation of the cause of the hangup." |
| 778 | }, |
| 779 | "tech_cause": { |
| 780 | "type": "int", |
| 781 | "description": "Integer representation of the technology-specific off-nominal cause of the hangup." |
| 782 | }, |
| 783 | "soft": { |
| 784 | "type": "boolean", |
| 785 | "description": "Whether the hangup request was a soft hangup request." |
| 786 | }, |
| 787 | "channel": { |
| 788 | "required": true, |
| 789 | "type": "Channel", |
| 790 | "description": "The channel on which the hangup was requested." |
| 791 | } |
| 792 | } |
| 793 | }, |
| 794 | "ChannelVarset": { |
| 795 | "id": "ChannelVarset", |
| 796 | "description": "Channel variable changed.", |
| 797 | "properties": { |
| 798 | "variable": { |
| 799 | "required": true, |
| 800 | "type": "string", |
| 801 | "description": "The variable that changed." |
| 802 | }, |
| 803 | "value": { |
| 804 | "required": true, |
| 805 | "type": "string", |
| 806 | "description": "The new value of the variable." |
| 807 | }, |
| 808 | "channel": { |
| 809 | "required": false, |
| 810 | "type": "Channel", |
| 811 | "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable." |
| 812 | } |
| 813 | } |
| 814 | }, |
| 815 | "ChannelHold": { |
| 816 | "id": "ChannelHold", |
| 817 | "description": "A channel initiated a media hold.", |
| 818 | "properties": { |
| 819 | "channel": { |
| 820 | "required": true, |
| 821 | "type": "Channel", |
| 822 | "description": "The channel that initiated the hold event." |
| 823 | }, |
| 824 | "musicclass": { |
| 825 | "required": false, |
| 826 | "type": "string", |
| 827 | "description": "The music on hold class that the initiator requested." |
| 828 | } |
| 829 | } |
| 830 | }, |
| 831 | "ChannelUnhold": { |
| 832 | "id": "ChannelUnhold", |
| 833 | "description": "A channel initiated a media unhold.", |
| 834 | "properties": { |
| 835 | "channel": { |
| 836 | "required": true, |
| 837 | "type": "Channel", |
| 838 | "description": "The channel that initiated the unhold event." |
| 839 | } |
| 840 | } |
| 841 | }, |
| 842 | "ChannelToneDetected": { |
| 843 | "id": "ChannelToneDetected", |
| 844 | "description": "Tone was detected on the channel.", |
| 845 | "properties": { |
| 846 | "channel": { |
| 847 | "required": true, |
| 848 | "type": "Channel", |
| 849 | "description": "The channel the tone was detected on." |
| 850 | } |
| 851 | } |
| 852 | }, |
| 853 | "ChannelTalkingStarted": { |
| 854 | "id": "ChannelTalkingStarted", |
| 855 | "description": "Talking was detected on the channel.", |
| 856 | "properties": { |
| 857 | "channel": { |
| 858 | "required": true, |
| 859 | "type": "Channel", |
| 860 | "description": "The channel on which talking started." |
| 861 | } |
| 862 | } |
| 863 | }, |
| 864 | "ChannelTalkingFinished": { |
| 865 | "id": "ChannelTalkingFinished", |
| 866 | "description": "Talking is no longer detected on the channel.", |
| 867 | "properties": { |
| 868 | "channel": { |
| 869 | "required": true, |
| 870 | "type": "Channel", |
| 871 | "description": "The channel on which talking completed." |
| 872 | }, |
| 873 | "duration": { |
| 874 | "required": true, |
| 875 | "type": "int", |
| 876 | "description": "The length of time, in milliseconds, that talking was detected on the channel" |
| 877 | } |
| 878 | } |
| 879 | }, |
| 880 | "ContactStatusChange": { |
| 881 | "id": "ContactStatusChange", |
| 882 | "description": "The state of a contact on an endpoint has changed.", |
| 883 | "properties": { |
| 884 | "endpoint": { |
| 885 | "required": true, |
| 886 | "type": "Endpoint" |
| 887 | }, |
| 888 | "contact_info": { |
| 889 | "required": true, |
| 890 | "type": "ContactInfo" |
| 891 | } |
| 892 | } |
| 893 | }, |
| 894 | "PeerStatusChange": { |
| 895 | "id": "PeerStatusChange", |
| 896 | "description": "The state of a peer associated with an endpoint has changed.", |
| 897 | "properties": { |
| 898 | "endpoint": { |
| 899 | "required": true, |
| 900 | "type": "Endpoint" |
| 901 | }, |
| 902 | "peer": { |
| 903 | "required": true, |
| 904 | "type": "Peer" |
| 905 | } |
| 906 | } |
| 907 | }, |
| 908 | "EndpointStateChange": { |
| 909 | "id": "EndpointStateChange", |
| 910 | "description": "Endpoint state changed.", |
| 911 | "properties": { |
| 912 | "endpoint": { |
| 913 | "required": true, |
| 914 | "type": "Endpoint" |
| 915 | } |
| 916 | } |
| 917 | }, |
| 918 | "Dial": { |
| 919 | "id": "Dial", |
| 920 | "description": "Dialing state has changed.", |
| 921 | "properties": { |
| 922 | "caller": { |
| 923 | "required": false, |
| 924 | "type": "Channel", |
| 925 | "description": "The calling channel." |
| 926 | }, |
| 927 | "peer": { |
| 928 | "required": true, |
| 929 | "type": "Channel", |
| 930 | "description": "The dialed channel." |
| 931 | }, |
| 932 | "forward": { |
| 933 | "required": false, |
| 934 | "type": "string", |
| 935 | "description": "Forwarding target requested by the original dialed channel." |
| 936 | }, |
| 937 | "forwarded": { |
| 938 | "required": false, |
| 939 | "type": "Channel", |
| 940 | "description": "Channel that the caller has been forwarded to." |
| 941 | }, |
| 942 | "dialstring": { |
| 943 | "required": false, |
| 944 | "type": "string", |
| 945 | "description": "The dial string for calling the peer channel." |
| 946 | }, |
| 947 | "dialstatus": { |
| 948 | "required": true, |
| 949 | "type": "string", |
| 950 | "description": "Current status of the dialing attempt to the peer." |
| 951 | } |
| 952 | } |
| 953 | }, |
| 954 | "StasisEnd": { |
| 955 | "id": "StasisEnd", |
| 956 | "description": "Notification that a channel has left a Stasis application.", |
| 957 | "properties": { |
| 958 | "channel": { |
| 959 | "required": true, |
| 960 | "type": "Channel" |
| 961 | } |
| 962 | } |
| 963 | }, |
| 964 | "StasisStart": { |
| 965 | "id": "StasisStart", |
| 966 | "description": "Notification that a channel has entered a Stasis application.", |
| 967 | "properties": { |
| 968 | "args": { |
| 969 | "required": true, |
| 970 | "type": "List[string]", |
| 971 | "description": "Arguments to the application" |
| 972 | }, |
| 973 | "channel": { |
| 974 | "required": true, |
| 975 | "type": "Channel" |
| 976 | }, |
| 977 | "replace_channel": { |
| 978 | "required": false, |
| 979 | "type": "Channel" |
| 980 | } |
| 981 | } |
| 982 | }, |
| 983 | "TextMessageReceived": { |
| 984 | "id": "TextMessageReceived", |
| 985 | "description": "A text message was received from an endpoint.", |
| 986 | "properties": { |
| 987 | "message": { |
| 988 | "required": true, |
| 989 | "type": "TextMessage" |
| 990 | }, |
| 991 | "endpoint": { |
| 992 | "required": false, |
| 993 | "type": "Endpoint" |
| 994 | } |
| 995 | } |
| 996 | }, |
| 997 | "ChannelConnectedLine": { |
| 998 | "id": "ChannelConnectedLine", |
| 999 | "description": "Channel changed Connected Line.", |
| 1000 | "properties": { |
| 1001 | "channel": { |
| 1002 | "required": true, |
| 1003 | "type": "Channel", |
| 1004 | "description": "The channel whose connected line has changed." |
| 1005 | } |
| 1006 | } |
| 1007 | }, |
| 1008 | "ChannelTransfer": { |
| 1009 | "id": "ChannelTransfer", |
| 1010 | "description": "transfer on a channel.", |
| 1011 | "properties": { |
| 1012 | "state": { |
| 1013 | "required": false, |
| 1014 | "type": "string", |
| 1015 | "description": "Transfer State" |
| 1016 | }, |
| 1017 | "refer_to": { |
| 1018 | "required": true, |
| 1019 | "type": "ReferTo", |
| 1020 | "description": "Refer-To information with optionally both affected channels" |
| 1021 | }, |
| 1022 | "referred_by": { |
| 1023 | "required": true, |
| 1024 | "type": "ReferredBy", |
| 1025 | "description": "Referred-By SIP Header according rfc3892" |
| 1026 | } |
| 1027 | } |
| 1028 | }, |
| 1029 | "ReferTo": { |
| 1030 | "id": "ReferTo", |
| 1031 | "description": "transfer destination requested by transferee", |
| 1032 | "properties": { |
| 1033 | "requested_destination": { |
| 1034 | "required": true, |
| 1035 | "type": "RequiredDestination" |
| 1036 | }, |
| 1037 | "destination_channel": { |
| 1038 | "required": false, |
| 1039 | "type": "Channel", |
| 1040 | "description": "The Channel Object, that is to be replaced" |
| 1041 | }, |
| 1042 | "connected_channel": { |
| 1043 | "required": false, |
| 1044 | "type": "Channel", |
| 1045 | "description": "Channel, connected to the to be replaced channel" |
| 1046 | }, |
| 1047 | "bridge": { |
| 1048 | "required": false, |
| 1049 | "type": "Bridge", |
| 1050 | "description": "Bridge connecting both destination channels" |
| 1051 | } |
| 1052 | } |
| 1053 | }, |
| 1054 | "ReferredBy": { |
| 1055 | "id": "ReferredBy", |
| 1056 | "description": "transfer destination requested by transferee", |
| 1057 | "properties": { |
| 1058 | "source_channel": { |
| 1059 | "required": true, |
| 1060 | "type": "Channel", |
| 1061 | "description": "The channel on which the refer was received" |
| 1062 | }, |
| 1063 | "connected_channel": { |
| 1064 | "required": false, |
| 1065 | "type": "Channel", |
| 1066 | "description": "Channel, Connected to the channel, receiving the transfer request on." |
| 1067 | }, |
| 1068 | "bridge": { |
| 1069 | "required": false, |
| 1070 | "type": "Bridge", |
| 1071 | "description": "Bridge connecting both Channels" |
| 1072 | } |
| 1073 | } |
| 1074 | }, |
| 1075 | "RequiredDestination": { |
| 1076 | "id": "RequiredDestination", |
| 1077 | "description": "Information about the requested destination", |
| 1078 | "properties": { |
| 1079 | "protocol_id": { |
| 1080 | "required": false, |
| 1081 | "type": "string", |
| 1082 | "description": "the requested protocol-id by the referee in case of SIP channel, this is a SIP Call ID, Mutually exclusive to destination" |
| 1083 | }, |
| 1084 | "destination": { |
| 1085 | "required": false, |
| 1086 | "type": "string", |
| 1087 | "description": "Destination User Part. Only for Blind transfer. Mutually exclusive to protocol_id" |
| 1088 | }, |
| 1089 | "additional_protocol_params": { |
| 1090 | "required": false, |
| 1091 | "type": "List[AdditionalParam]", |
| 1092 | "description": "List of additional protocol specific information" |
| 1093 | } |
| 1094 | } |
| 1095 | }, |
| 1096 | "AdditionalParam": { |
| 1097 | "id": "AdditionalParam", |
| 1098 | "description": "Protocol specific additional parameter", |
| 1099 | "properties": { |
| 1100 | "parameter_name": { |
| 1101 | "required": true, |
| 1102 | "type": "string", |
| 1103 | "description": "Name of the parameter" |
| 1104 | }, |
| 1105 | "parameter_value": { |
| 1106 | "required": true, |
| 1107 | "type": "string", |
| 1108 | "description": "Value of the parameter" |
| 1109 | } |
| 1110 | } |
| 1111 | }, |
| 1112 | "RESTHeader": { |
| 1113 | "id": "RESTHeader", |
| 1114 | "description": "REST over Websocket header", |
| 1115 | "properties": { |
| 1116 | "name": { |
| 1117 | "type": "string", |
| 1118 | "description": "Header name", |
| 1119 | "required": true |
| 1120 | }, |
| 1121 | "value": { |
| 1122 | "required": true, |
| 1123 | "type": "string", |
| 1124 | "description": "Header value" |
| 1125 | } |
| 1126 | } |
| 1127 | }, |
| 1128 | "RESTQueryStringParameter": { |
| 1129 | "id": "RESTQueryStringParameter", |
| 1130 | "description": "REST over Websocket Query String Parameter", |
| 1131 | "properties": { |
| 1132 | "name": { |
| 1133 | "type": "string", |
| 1134 | "description": "Parameter name", |
| 1135 | "required": true |
| 1136 | }, |
| 1137 | "value": { |
| 1138 | "required": true, |
| 1139 | "type": "string", |
| 1140 | "description": "Parameter value" |
| 1141 | } |
| 1142 | } |
| 1143 | }, |
| 1144 | "RESTRequest": { |
| 1145 | "id": "RESTRequest", |
| 1146 | "description": "REST over Websocket Request.", |
| 1147 | "properties": { |
| 1148 | "type": { |
| 1149 | "type": "string", |
| 1150 | "description": "Message type. Must be 'RESTRequest'", |
| 1151 | "required": true |
| 1152 | }, |
| 1153 | "transaction_id": { |
| 1154 | "type": "string", |
| 1155 | "description": "Opaque transaction id. Can be any valid string. Will be returned in any response to this request.", |
| 1156 | "required": true |
| 1157 | }, |
| 1158 | "request_id": { |
| 1159 | "type": "string", |
| 1160 | "description": "Opaque request id. Can be any valid string. Will be returned in any response to this request.", |
| 1161 | "required": true |
| 1162 | }, |
| 1163 | "method": { |
| 1164 | "required": true, |
| 1165 | "type": "string", |
| 1166 | "description": "HTTP method (GET, PUT, POST, DELETE, etc.)" |
| 1167 | }, |
| 1168 | "uri": { |
| 1169 | "required": true, |
| 1170 | "type": "string", |
| 1171 | "description": "Resource URI with optional query string parameters." |
| 1172 | }, |
| 1173 | "content_type": { |
| 1174 | "required": false, |
| 1175 | "type": "string", |
| 1176 | "description": "The Content-Type of the message body." |
| 1177 | }, |
| 1178 | "query_strings": { |
| 1179 | "required": false, |
| 1180 | "type": "List[RESTQueryStringParameter]", |
| 1181 | "description": "Request query string parameters." |
| 1182 | }, |
| 1183 | "message_body": { |
| 1184 | "required": false, |
| 1185 | "type": "string", |
| 1186 | "description": "Request message body. Only content types application/json and application/x-www-form-urlencoded are supported." |
| 1187 | } |
| 1188 | } |
| 1189 | }, |
| 1190 | "RESTResponse": { |
| 1191 | "id": "RESTResponse", |
| 1192 | "description": "REST over Websocket Response.", |
| 1193 | "properties": { |
| 1194 | "transaction_id": { |
| 1195 | "type": "string", |
| 1196 | "description": "Opaque transaction id. Will be whatever was specified on the original request.", |
| 1197 | "required": true |
| 1198 | }, |
| 1199 | "request_id": { |
| 1200 | "type": "string", |
| 1201 | "description": "Opaque request id. Will be whatever was specified on the original request.", |
| 1202 | "required": true |
| 1203 | }, |
| 1204 | "status_code": { |
| 1205 | "required": true, |
| 1206 | "type": "int", |
| 1207 | "description": "HTTP status code" |
| 1208 | }, |
| 1209 | "reason_phrase": { |
| 1210 | "required": true, |
| 1211 | "type": "string", |
| 1212 | "description": "HTTP reason phrase" |
| 1213 | }, |
| 1214 | "uri": { |
| 1215 | "required": true, |
| 1216 | "type": "string", |
| 1217 | "description": "Original request resource URI" |
| 1218 | }, |
| 1219 | "content_type": { |
| 1220 | "required": false, |
| 1221 | "type": "string", |
| 1222 | "description": "The Content-Type of the message body." |
| 1223 | }, |
| 1224 | "message_body": { |
| 1225 | "required": false, |
| 1226 | "type": "string", |
| 1227 | "description": "Response message body" |
| 1228 | } |
| 1229 | } |
| 1230 | }, |
| 1231 | "CallBroadcast": { |
| 1232 | "id": "CallBroadcast", |
| 1233 | "description": "Notification that a channel is being broadcast to ARI applications for claiming.", |
| 1234 | "properties": { |
| 1235 | "channel": { |
| 1236 | "required": true, |
| 1237 | "type": "Channel", |
| 1238 | "description": "The channel being broadcast." |
| 1239 | }, |
| 1240 | "caller": { |
| 1241 | "required": false, |
| 1242 | "type": "string", |
| 1243 | "description": "The caller ID number." |
| 1244 | }, |
| 1245 | "called": { |
| 1246 | "required": false, |
| 1247 | "type": "string", |
| 1248 | "description": "The called number." |
| 1249 | } |
| 1250 | } |
| 1251 | }, |
| 1252 | "CallClaimed": { |
| 1253 | "id": "CallClaimed", |
| 1254 | "description": "Notification that a broadcast channel has been successfully claimed by an ARI application.", |
| 1255 | "properties": { |
| 1256 | "channel": { |
| 1257 | "required": true, |
| 1258 | "type": "Channel", |
| 1259 | "description": "The channel that was claimed." |
| 1260 | }, |
| 1261 | "winner_app": { |
| 1262 | "required": true, |
| 1263 | "type": "string", |
| 1264 | "description": "The name of the ARI application that claimed the channel." |
| 1265 | } |
| 1266 | } |
| 1267 | } |
| 1268 | } |
| 1269 | } |